entity-framework
Entity framework ToList() isn't working
I have some code like this: var db = new MYContext(); var invoice = new Invoice { InvoiceId = 7 }; db.Set<Invoice>().Add(invoice);[详细]
2023-04-13 09:12 分类:问答SaveChanges in Entity Framework insert statement foreign key error
I have a property object and I wanted to delete that from the latest repository collection. Or I can say detach it before saving to the database. There is a Property table which is main and history an[详细]
2023-04-13 08:56 分类:问答Validation failed for one or more entities. See 'EntityValidationErrors' property for more details [duplicate]
This question already has answers here: Getting exact error type in from DbValidationException (8 answers)[详细]
2023-04-13 08:53 分类:问答How can I access two or more identical tables using Entity Framework Model
For each manufacturing cycle a new identically structured table is created in a DB; call them M100, M101, etc.I want to point my Entity Framework m开发者_如何学Pythonodel to different instances of the[详细]
2023-04-13 08:32 分类:问答How do I prevent InvalidOperationException saving a cyclic graph of entities?
Given the entities, class A { B DefaultB { get; set; } C DefaultC { get; set; } } class B { A { get; set; }[详细]
2023-04-13 07:47 分类:问答Linq to Entities Complex Dynamic Search
We\'re using the Entity Framework (MySQL connector) and are creating a central Search facility on our web application.[详细]
2023-04-13 07:25 分类:问答Serializing Entity Framework Objects into JSON
public class GenericHandler : IHttpHandler { public class ASSystem { public string SID { get; set; } public string Description { get; set; }[详细]
2023-04-13 06:25 分类:问答Using a predicate to find all rows?
I have the following code, I am using the repository pattern in EF 4.1 and Unit of Work. However because I dont understand very much how Expression and Predicates works I ask the following:[详细]
2023-04-13 06:19 分类:问答many to many relationship in EF 4.1
I am just doing a small application with 3 tables. Applicants Positions ApplicantsPerPosition. This last one would be a many to many relationship with the other 2 tables.[详细]
2023-04-13 05:50 分类:问答How to get the amount of colums from a SQL database with LinqDataSource?
I want to make a foreach loop which runs for each column I have in my current table. My situation is that I have my ASP.Net project where I have one Microsoft SQL Model which I imported and created a[详细]
2023-04-13 05:34 分类:问答