Sometimes you simply have to mix models. Perhaps use SqlBulkCopy
for this part of your repository (since this plugs directly into the bulk-copy API), and Entity Framework for some of the rest. And if necessary, a bit of direct ADO.NET. Ultimately the goal is to get the job done.
More Related Contents:
- ASP.NET MVC – Attaching an entity of type ‘MODELNAME’ failed because another entity of the same type already has the same primary key value
- Dynamic where clause (OR) in Linq to Entities
- How to create LINQ Expression Tree to select an anonymous type
- Why does the EF 6 tutorial use asynchronous calls?
- ‘Contains()’ workaround using Linq to Entities?
- Method cannot be translated into a store expression
- How to add/update child entities when updating a parent entity in EF
- “A lambda expression with a statement body cannot be converted to an expression tree”
- Filter/Search using Multiple Fields – ASP.NET MVC
- Non-static method requires a target
- Using Asp.Net Identity DataBase first approach
- Implementing Audit Log / Change History with MVC & Entity Framework
- linq to entities doesn’t recognize a method
- How to group by on 2 child entities and get total of both this child entities?
- LINQ to Entities does not recognize the method ‘System.Web.Mvc.FileResult’
- Questions about Entity Framework Context Lifetime
- Is Deferred Execution in Asp.net MVC View a very bad thing?
- Why is Asp.Net Identity IdentityDbContext a Black-Box?
- ASP.NET Identity – Multiple object sets per type are not supported
- How to I apply filter while paginating in Asp.net MVC and entity Framework?
- Set database timeout in Entity Framework
- Dynamic query with OR conditions in Entity Framework
- Only primitive types or enumeration types are supported in this context
- Calling a SQL User-defined function in a LINQ query
- Async PartialView causes “HttpServerUtility.Execute blocked…” exception
- The LINQ expression node type ‘ArrayIndex’ is not supported in LINQ to Entities
- Repository Pattern, POCO, and Business Entities
- MVC 4 – Many-to-Many relation and checkboxes
- .NET Managing Layers Relationships
- Entity Framework Many to many through containing object