ef4-code-only
How to add entity to multiple tables?
I have 2 tables in my DB: Students and StudentsHistory. The idea is that every change in the Students table must create a new record in the StudentsHistory table (e.g. when I edit a student, 2 operati[详细]
2023-04-08 20:51 分类:问答DbContext SaveChanges Order of Statement Execution
I have a table that has a unique index on a table with an Ordinal column.So for example the table will have the following columns:[详细]
2023-04-03 00:32 分类:问答How to accept JSON in a WCF DataService?
I\'m trying to understand how to use WCF Data Services (based on EF 4.1) to create a restful web service that will persist entities passed as JSON objects.[详细]
2023-03-25 07:25 分类:问答EF Linq Query Collection with an eager loaded child-collection
I\'m using EF4.1 code first, I\'m trying to to create a query which returns a collection with an eager loaded child-collection.[详细]
2023-03-22 09:21 分类:问答How do I map a char property using the Entity Framework 4.1 "code only" fluent API?
I have an object that has a char property: public class Product { public char Code { get; set; } } Entity Framework doesn\'t seem to be able to map chars (this field is missing from the database wh[详细]
2023-03-21 21:39 分类:问答WCF Data Service and Entity Framework proxy objects
I have a question regarding WCF DataService and Entity Framework 4.1 (code-first). So I have a DataService on web server:[详细]
2023-03-11 10:27 分类:问答How to reuse part of Linq to Entity Select expression in EF4.1 code only scenario
Here is very simplified version of code that i have: class PrintJob : IEntity { public string UserName { get; set; }[详细]
2023-03-11 02:57 分类:问答EF4 Selftracking Entity
I\'m wokring on building dataAcess layer for my application I\'m using EF4 Self tracking entities I build entities quit well now I have to seprate self entities to their files so I can use for N tiers[详细]
2023-02-25 03:45 分类:问答Mocking DbEntityEntry.CurrentValues.SetValues() in EF4 CTP5 Code First
I am trying to use the DbEntityEntry.CurrentValues.SetValues() method to facilitate updating an existing entity with values from a non-entity DTO (see: http://blogs.msdn.com/b/adonet/archive/2011/01/3[详细]
2023-02-19 20:37 分类:问答EF 4.1 Code First adding to a foreign key collection
If I have an entity with a collection property for another entity. What is the best way to add a new entity and it\'s related entities? The problem I have is that the collection is initially null.[详细]
2023-02-19 17:52 分类:问答