Questions tagged as 'entity-framework-6'

1
answer

EF is giving Timeout in a query that should be instantaneous

When I run the SQL generated by direct EF in SQLServer it runs less than 1 second. When you run the application it times out because it takes more than 30 seconds. I have seen a lot of this problem on the internet with procedure calls, but wh...
asked by 24.08.2015 / 20:34
1
answer

What is the Dynamic Proxy generated by the Entity Framework?

What is the Dynamic Proxy generated by the Entity Framework? And a class? What is the function of it?     
asked by 07.01.2015 / 14:06
2
answers

Is it possible to work directly with EntityFramework sources?

Is it possible to work directly with Entity Framework and debug sources within your classes and methods? > I downloaded the zip code from it contained in CodePlex . I unpacked it into a folder and in my project I added the project dire...
asked by 27.08.2014 / 23:07
1
answer

How do I set default properties for a variable that start with a specific text?

Is there any way to set the properties of a variable by default to the initials of variables? Something like public string obsUsuario { get; set; } , all of which start with obs default to the IsOptional property, (or / and oth...
asked by 25.11.2016 / 17:11
1
answer

Is it possible to make a condition within a Select?

I'm running a query using Select , to select only the required fields and consequently to have higher performance. In my View user can choose certain fields to load My ViewModel public class CliViewModel { public b...
asked by 03.11.2015 / 18:18
1
answer

How to create a foreign key in a table where data already exists, in the EntityFramework with Code-First?

I have a system already in production from which the customer has requested a modification. Modification is the creation of an EMPLOYEE table that will relate to the DRIVE table, creating a 1: N relationship (One Employee, multiple DRIVES)....
asked by 10.04.2015 / 22:37
2
answers

What is the proxy creation in the entity framework?

What is the purpose of disabling this feature?     
asked by 02.01.2018 / 12:01
1
answer

Updating collections with entity framework

Is it possible to update the Collection of an entity with relationship one-to-many through its navigation property ? public class Foo { public virtual IList<Bar> Bars {get; set;} public int FooID { get; set; } }...
asked by 23.09.2015 / 14:25
1
answer

How to mount SELECT in lambda C #?

Recently I asked for help to assemble a SELECT to bring the price of the products How to mount SELECT They gave me this solution that worked perfectly: SELECT P.PROCODIGO, P.PRONOME, H.HISPRECO FROM PRODUTO P INNER JOIN HISTORICO H ON...
asked by 16.02.2016 / 20:18
1
answer

Entity Framework - What's the difference between EntityState.Modified and Sem EntityState.Modified?

What's the difference between the two? With EntityState: var registro = db.MinhaTabela.Where(a => a.MeuCampo == "Valor_Antigo").FirstOrDefault(); registro.MeuCampo = "Valor_Novo"; db.Entry(registro).State = EntityState.Modified; db.Sav...
asked by 03.02.2017 / 05:17