EF CTP 5. I have one instance where I would like to receive an unprotected entity. I can't seem to find a way to do this. I do not want to disable the creation of a proxy server together, I just need this for this single request. Can anyone help?
Here is a simple example:
var myEntity = DbContext.Entities.Find(1); var unproxy = myEntity...?
, - DbContext . , DynamicProxy - , , . -, . :
DbContext
using (var context = new MyDbContext(connectionString)) { ((IObjectContextAdapter)context).ObjectContext.ContextOptions.ProxyCreationEnabled = false; var myEntity = context.Entities.Find(1); }
Source: https://habr.com/ru/post/1792290/More articles:What can cause the "number of commits forward" to change after a reboot? - gitRequest for missing items - nullStructure three20, how to change the default row height of a TTTableView? - iphoneOptimistic RegEx match for user text input - c #Problems Compiling SDCC and ASM Code on Intel 8051 - assemblyWhen a page is enlarged when viewed on phones? - htmlFinding the largest of each subarray of length k - algorithmIs multiplication always commutative in inaccurate floating point arithmetic? - arraysXML parsing with C # - c #How to add a footer row that displays the number of rows in a matrix in SQL Reporting Services? - reporting-servicesAll Articles