Questions tagged as 'entity-framework'

2
answers

Tool to generate little

I have a postgres database with several tables and I need to generate their classes. Is there any free tool that manages the few to be used with EF6? I searched but did not find it. I am using VS2015 and postgres latest version.     
asked by 17.08.2017 / 01:02
1
answer

EF Core Complex Object Insertion with WebAPI

I'm developing a WebAPI (.NET) application with EntityFramework Core. I have implemented the following entities: Pais.cs public class Pais { [Key] public int Id { get; set; } [MaxLength(100), Required] public string Descri...
asked by 29.06.2017 / 15:10
1
answer

Check for list records in the entity framework

I have the following code: var ret = Monitoramento.List .Include(p => p.CD) .ThenInclude(p => p.CargaEntrega) .ThenInclude(p => p.CargaEntrega.Motorista) .ThenInclude(p => p.CargaEntr...
asked by 13.07.2017 / 16:50
1
answer

Linq to Entities x Lambda Expression

What's the difference between Linq to Entities and Lambda Expression? Is Linq to Entities still used in the Entity Framework or is there something newer?     
asked by 30.04.2017 / 13:21
1
answer

Browse by Date

Well I'm using EF with the following code to query it brings the query by name and type but not date, since the time is not in my filter with the 00:00:00 time it brings correctly the time not is part of the research, but it is part of the busin...
asked by 26.06.2017 / 15:15
1
answer

modelBuilder add only one variable with different varchar

On my system, I have a small code that adds varchar to all the variables added in the database modelBuilder.Properties<string>() .Configure(p => p.HasMaxLength(150)); I need only one variable to be varchar (1000) could anyone help...
asked by 10.05.2017 / 20:03
2
answers

Entity Framework - When editing, fails in "db.Entry (category) .State = EntityState.Modified;"

I have a "Category" Entity, which contains id, name, created, and updated. I'm using Code First. This is my template: public class Category { public int CategoryId { get; set; } public string Name { get; set; } public DateTime C...
asked by 31.03.2017 / 17:01
1
answer

Doubt in consultation with EntityFramework

How do I make this query with EntityFramework ? with lambda or linq SELECT t0051_id_medicamento, t0100_lote, SUM(t0100_qtde) FROM t0100_historico GROUP BY t0051_id_medicamento, t0100_lote;     
asked by 26.01.2017 / 23:36
1
answer

Query with Linq to Entities in many-to-many relationship

I have the following tables in a database: The TeacherCourses table joins the many-to-many relationship between the Courses and Teachers tables. I have been trying for a long time to make a query with Linq to Entities that returns all...
asked by 23.12.2016 / 01:50
1
answer

Error Making CodeFirst in EnityFramework

This is the error that is occurring:   An unhandled exception of type 'System.TypeInitializationException'   occurred in EntityFramework.dll Additional information: O   initializer of type 'System.Data.Entity.Internal.AppConfig'   has thrown...
asked by 15.11.2016 / 18:08