Questions tagged as 'entity-framework-6'

1
answer

Using multiple Schemas with Entity Framework 6

I'm starting to work with the Entity Framework, and I need some example of how I can define for my tables the Schemas that each is contained. My database was created as in the example: /*schema [Pes] -> relativo ao contexto Pessoa*/ Pes.Pes...
asked by 07.10.2016 / 21:55
1
answer

Update object list via entity Framework

Good morning! I wanted to ask for your help just to see if there is a better way to do it. Today I have a list of objects of type    Formation_RelationLineDeletted and I make a foreach in this list, taking item by item giving the attac...
asked by 04.10.2016 / 17:22
1
answer

EntityFramework 6: Doubt when Persisting a Relationship N for N

Template: public class Agenda { public int Id { set; get; } public string Horario { set; get; } public string Local { set; get; } public virtual IEnumerable<Exame> Exames { set; get; } } public class Exame { public i...
asked by 28.07.2016 / 20:50
1
answer

Method terminates its execution unexpectedly when calling another method

I'm implementing a method that calls a method that should return a IEnumerable<TEntidade> . However, upon returning from this list the method that initiated the call simply terminates its execution without continuing to read the foll...
asked by 11.03.2015 / 14:50
1
answer

ASP.NET MVC 5 Form Can not Access Model Properties

I'm starting in ASP.NET MVC, following tutorials and handouts on the internet I created a study project and I have some doubts. Well, first I created a following class structure: > Acesso -> Possui informações de identificacao(Login e...
asked by 24.10.2014 / 13:55
1
answer

Place where methods of CRUD interaction with the bank should be in ASP.NET MVC

I'm using the entity framework and developing a system through ASP.NET MVC5, but I was in doubt about CRUD. The methods of interaction with the bank (Create, Update, Select, Delete) should be inserted in which part of the project? I thought o...
asked by 11.12.2014 / 12:17
1
answer

Expression does not work in Include in the Entity Framework

I tried the following expression var listag = db.grupo.Include(x => x.Itens).ToList(); It does not work that way, but if I pass it this way: db.grupo.Include("Itens").ToList(); , so it works, why? What am I doing wrong?     
asked by 18.08.2014 / 16:23
2
answers

Entity framework 6.2.0 + Find

Hello, I'm using a search method with entity framework and oracle, and I encountered a problem with dates. In my search I use the following logic: Find(x => x.Data_Intencao >= Periodo.Date, c => c.SubOrigem_EF); But in my Dat...
asked by 02.01.2019 / 19:03
1
answer

Compare existence of record with date and future date

I have the following model public class AgendaExame { public int Id {get; set;} public int PacienteId {get; set;} public int ExameId {get; set;} public DateTime Data {get; set;} public DateTime ProximaData {get; set;} }...
asked by 28.11.2018 / 20:14
1
answer

How to configure the IncrementBy of a PostGreen Id field using the Entity Framework Core

I have a table mapped to PostGre, but when I update the database, the PersonFisicaEnderecoTipoId Field is being auto-incremented by 10 (by default). How do I map so that IncrementBy is set to autoincrement by 1 in 1? TableMapping:publicclass...
asked by 30.11.2018 / 19:15