zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

64 results in tag: c#-4.0

Delete the object and any associated entities.

Does anyone know how to delete an object and all of it's related entities....For example I have tables, Products, Category, ProductCategory and productDetails, the productCategory is joining table of both Product and Category....I have read from ...http:/...
c# c#-4.0 entity-framework linq-to-entities
asked by Waheed

Exception code -532462766 complus

Using visual studio 2010, entity framework 4.0, ADO.NET POCO Entity Generator...On the code lines:...MecDbEnt.Domains.AddObject(subject);...MecDbEnt.SaveChanges(); (on this line)...the application throws follow exception:...complus exception code -53246...
c#-4.0 entity-framework exception visual-studio
asked by Masna

In LINQ, how do I get the first record in a group?

Summary: How to get top 1 element in ...ordered... groups of data...I am trying to group by a CarId field , and then within each group, I want to sort on a DateTimeStamp field descending. The desired data would be for each Car give me the latest DateTime...
c# c#-4.0 entity-framework linq linq-to-entities
asked by RyBolt

Current values are not updated by EF4 Context.ApplyCurrentValues.

I have a entity that I retrieve as follows and is detached from the context:...ctx.Reviews.MergeOption = MergeOption.NoTracking; Review review = (from r in ctx.Reviews.Include("ReviewNotes") where r.ReviewID == reviewID ...
c#-4.0 entity-framework
asked by Big Joe

Entity Framework vs. Enterprise Library and a few additional general questions

Brief blurb,...My skill in .net has been called "innovative" but I would prefer it be exemplary. Basically, I need a mentor. I own the domain name codeologist.com and I am going to live up to that name but in order to do so I need a mentor & community. ...
agile c#-4.0 enterprise-library entity-framework
asked by jetstreamin

When dealing with "EF-Code First," how can I define Keys?

I get a ModelValidationException (at the bottom) when working with "EF-Code First". It wants me to define a Key but I'm not sure what exactly it means......public class Unit { Guid id; String public_id; String name; bool deleted; }...
asp.net c#-4.0 code-first entity-framework
asked by gingerbreadboy

Change notice for underlying data (in database) in Entity Framework

I'm using the Entity Framework to manipulate data in a database with success so far....However, I would like to have more than one application playing with the data at the same time (concurrent edition)....Is there a way to get notified when the data in t...
c#-4.0 entity-framework notifications
asked by Nicolas

What does the "Pluralize or singularize produced object names" option mean?

When setting up a new Entity data Model, there is an option to...[x] Pluralize or singularize generated object names...I have noticed this is an option in LINQ as well. Also, now that I am studying the ADO.NET entity framework, I noticed it also has 'DEFA...
ado.net ado.net-entity-data-model c#-4.0 entity-framework
asked by user287745

Reflection c# mapping between business objects and entity objects

I want to somehow map entity object to business object using reflection in c# - ...public class Category { public int CategoryID { get; set; } public string CategoryName { get; set; } } ...My Entity Class has same properties, Cat...
.net c#-3.0 c#-4.0 entity-framework
asked by Hidsman

Linq query String.Format

I am stuck on a wierd problem. I have a ...CashGameGeneralViewModel... class wich looks like this...public class CashGameGeneralViewModel { public string Limit { get; set; } public int HandsPlayed { get; set; } public float AmountWon { get; s...
.net c#-4.0 entity-framework linq wpf
asked by Ivan Crojach Karačić

How to Lazy Initialize a List in POCO Entities Using System.Lazy and a Setter

I want to use System.Lazy to Lazy Initialization of my List in my Entites:...public class Questionary { private Lazy<List<Question>> _questions = new Lazy<List<Question>>(() => new List<Question>()); public IList<Question> Questions { get { retur...
.net c# c#-4.0 entity-framework lazy-initialization
asked by Acaz Souza

MVC Best Practices... Example of ViewModel Binding Using Interfaces

I am new to ASP.NET MVC 3.0 and trying to build an application using the MVC ViewModel design.. ...I was wondering what the best practices are regrading controllers for ViewModels and have a few questions below.. This is my understanding so far (which mig...
asp.net asp.net-mvc asp.net-mvc-3 c#-4.0 entity-framework
asked by HonourCode

Using Entity Framework and Metadata to Validate Data Annotation

I have a entity called Product,this is a part of it's declration:...[EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Product")] [Serializable()] [DataContractAttribute(IsReference=true)] public partial class Product : EntityObject { #regi...
c# c#-4.0 data-annotations entity-framework validation
asked by Arian

How to create a List from an Entity Framework query result

How to Put the following query result into a List...var result = from c in sb.Swithches_SW_PanalComponents select new { c.ID,c.SW_PanalComponents.ComponentsName,c.ComponentValue };
c# c#-4.0 entity-framework
asked by major

In a lambda expression, how do you "let"?

How can I rewrite this linq query to Entity on with lambda expression?... I want to use ...let... keyword or an equivalent in my lambda expression....var results = from store in Stores let AveragePrice = store.Sales.Average(s => s.Price) ...
c#-4.0 entity-framework lambda let linq
asked by Reza Owliaei

How to use the Code First method to join two tables

i have two table, User and Friendship. i want to join this two tables so that the column TheirFriends which have UserID of all friends will have some attribute that is in User. that is i want to get each friend with all their attribute. Output will look ...
asp.net-mvc c#-4.0 ef-code-first entity-framework
asked by Johnson Duru

How to use Expression Tree to build dynamic conditions

Please consider this code:...System.Linq.Expressions.Expression<Func<tbl, bool>> exp_details = r => r.ID_Master == Id && r.Year == Year && r.Month == Month ; ...I want to write a function that expect some argument, and then retrieve some data from my data...
c# c#-4.0 entity-framework expression-trees linq
asked by Arian

Timeout elapsed on the underlying provider, resulting in an entity exception.

OK, I'm stumped. I am trying to create a .NET Winforms app to talk to a database via Entity Framework. I originally created a ASP.NET MVC3 app (with a seperate DAL layer) that can talk to the database after initially failing. SO the first time that it tri...
asp.net-mvc c#-4.0 connection-string entity-framework sql
asked by Lutz Kretzschmar

Iqueryable to IEnumerable conversion

What is the problem with my code below.Its not returning any items even when matching records are present in db .if wrong how can I convert my IQueryable to IEnumerable ?...public IEnumerable<TimelineItem> TimeLineItems { get; set; } public IEnume...
c#-4.0 entity-framework linq
asked by Renny

CSDL, SSDL, and MSL files for Entity Framework

I'm just being picky but I was researching how does Entity Framework generates the DLL from an EDMX file and I saw this on msdn:...The Entity Data Model Designer (Entity Designer) stores model and mapping information in an .edmx file at design time. At b...
ado.net-entity-data-model c# c#-4.0 entity-framework visual-studio-2010
asked by Diego

Page 1 of 4
  • 1
  • 2
  • 3
  • 4
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!