objectcontext
Why is this throwing a NULL value exception?
For some reason I am getting the following error at the db.SaveChanges(); instruction: Cannot insert the value NULL into column \'UserId\', table \'XXXXXXXXX_Dev.dbo.Portfolios\'; column does not all[详细]
2023-03-19 02:53 分类:问答How to properly dispose the ObjectContext in a Repository and Unit of Work pattern
I\'m using Entity Framework 4 and I have created a UnitOfWork class that creates my Context and exposes that through a public property as a IContext interface.[详细]
2023-03-18 17:27 分类:问答How to detach entities from EF Code First contexts
This seems a lot harder than it should be. I\'m writing an event registration site using MVC3, SQL Compact Edition, and Entity Frameworks Code First, and making use of Steven Sanderson\'s Mvc Scaffol[详细]
2023-03-13 17:45 分类:问答Refresh / Recreate an EF object context in code or on application load
Is there a way to do, in code, what is done when creating an object context under add New Item --> Entity Data Model in visual studio?[详细]
2023-03-13 14:40 分类:问答How to bind EF Code First DbContext to an Asp.Net DataSource?
I\'ve created the following Context to be used with Entity Framework Code First: public class Context : DbContext[详细]
2023-03-12 17:29 分类:问答Reliable way to run code against Entities just Inserted with ObjectContext?
I have some code that needs to run every time an Entity is Inserted into my database, th开发者_开发问答e problem is that this code requires the Entity PrimaryKey.[详细]
2023-03-10 16:43 分类:问答EF4.0 - Is there a way to see what entities are attached to what ObjectContext during debugging?
This is in continuation with my problem here. I\'m trying to use the solution Julie Lerman gave me a few months ago.I\'m currently using the following to generate a new Game entity pre-attached to my[详细]
2023-03-10 14:46 分类:问答Entity Framework question to do with timing of save
I have an object that has an ObjectContext.OnSave of that object I am running an action using that ObjectContext like this:[详细]
2023-03-09 08:44 分类:问答Multi-Threaded SubQueries using Entity Framework throws errors
I have been trying to update the performance of my code in regards to database queries.The problem I am currently running into is that I cant seem to find a way to get a new context for each subQuery.[详细]
2023-03-07 05:43 分类:问答Generic ObjectContext? objectContext.GetObjectSet<TEntity>?
Is there a way to get ObjectQuery<T> for specfied generic type? Ps开发者_开发百科eudo: public partial class MyObjectContext[详细]
2023-03-04 06:02 分类:问答