AK
Size: a a a
AK
JS
JS
_accountDbContext.Set<TheModel>().FromSqlRaw("select * from the_fuck");
System.InvalidOperationException: 'Cannot create a DbSet for 'TheModel' because this type is not included in the model for the context.'
JS
ObjectContext objContext = ((IObjectContextAdapter)dbContext).ObjectContext;
using (var connection = objContext.Connection as EntityConnection)
{
// Create Entity SQL command querying conceptual model hidden behind your code-first mapping
EntityCommand command = connection.CreateCommand();
command.CommandText = "SELECT VALUE entity FROM ContextName.DbSetName AS entity";
connection.Open();
using (EntityDataReader reader = command.ExecuteReader(CommandBehavior.SequentialAccess))
{
...
}
}
OT
JS
L
LU
IP
MK
A
OD
JS
V
Я
OP
VL
LU
OP
LU