The relationship could not be changed because one or more of the foreign-key properties is non-nullable
I am getting this error when I GetById() on an entity and then set the collection of child entities to my new list … Read more
I am getting this error when I GetById() on an entity and then set the collection of child entities to my new list … Read more
I have this query: int maxShoeSize = Workers .Where(x => x.CompanyId == 8) .Max(x => x.ShoeSize); What will be in maxShoeSize if company … Read more
I’m using EF 6.0 for my project in C# with manual migrations and updates. I have about 5 migrations on the database, but … Read more
I have a SQL Server table in Entity Framework named employ with a single key column named ID. How do I delete a … Read more
I have a project that uses Entity Framework. While calling SaveChanges on my DbContext, I get the following exception: System.Data.Entity.Validation.DbEntityValidationException: Validation failed for … Read more
In using the EntityFramework, I get the error “A lambda expression with a statement body cannot be converted to an expression tree” when … Read more
I was using an .mdf for connecting to a database and entityClient. Now I want to change the connection string so that there … Read more
Let’s just suppose I have a valid need for directly executing a sql command in Entity Framework. I am having trouble figuring out … Read more
is there “elegant” way to give specific property a default value ? Maybe by DataAnnotations, something like : [DefaultValue(“true”)] public bool Active { … Read more
I’m (re)designing large-scale application, we use multi-layer architecture based on DDD. We have MVC with data layer (implementation of repositories), domain layer (definition … Read more