Questions tagged as 'fluent-api'

0
answers

How to solve Stackoverflow exception that occurs in Entity Mapping for Model?

In my application a Team has several users and a User belongs only to a Team (1: N), so I have the following entities: public class Equipe{ public Guid EquipeId {get; set;} public string Nome {get; set;} public virtual ICollect...
asked by 18.05.2018 / 00:51
3
answers

Problem mapping entities related to Fluent API

I'm starting with EF and I'm having trouble mapping the relationship between my entities. 1. Entities There are two entities in the project that I'm using to practice the subject. These are: User Soccer team A user has a unique so...
asked by 30.06.2017 / 21:27
0
answers

Automapper error in relationship

I have the following classes: public class ListaGrupo : EntidadeBase { public ListaGrupo() { Items = new List<ListaGrupoItem>(); } public int Id { get; set; } public string Nome { get; set; } public virtu...
asked by 13.10.2016 / 21:26
1
answer

Fluent Api inserting unwanted records

I have the following classes: Status.cs public class Estado { public Int32 EstadoId { get; set; } public Int32 CodigoEstado { get; set; } public String Sigla { get; set; } public String Nome { get; set; } public virtua...
asked by 26.08.2016 / 21:14
1
answer

Fluent API zero-to-one Relationship 0-1 - bringing results from another relationship

I'm trying to make the relationship between my Cliente and CieloToken , tried with Fluent API and Data Annotation , I mixed them both and it did not work. In fact it does, but even though Cliente does not have...
asked by 12.05.2016 / 20:46
1
answer

Declare Relationship Entity Framework one to many

I have two classes: Person public class Pessoa { public int Codigo { get; set; } public string Nome { get; set; } .... public virtual ICollection<Endereco> Endereco { get; set; } } Address public class Endereco {...
asked by 26.10.2017 / 20:05
1
answer

Dependencies with EntityFramework C #

My question is how to use the state class include for parents because the city class has no parent connection. How can I accomplish this sql loading dependencies? private void FrmCidade_Load(object sender, EventArgs e) { var registros = Co...
asked by 15.09.2017 / 17:26
1
answer

Class Mapping with FluentAPI and Entityframework C #

Parent, State, City Table A country can have several states and a state can have only 1 country;    State-> Country: 1: N A city can have only one state and one state can have several cities.    City | State 1: N       I would like...
asked by 22.06.2017 / 17:24
1
answer

The member with identity '' does not exist in the metadata collection?

I could not figure out how to solve this problem between my base and my mapping using Fluent API. I have a mapping in the Fluent API of a certain pre-existing table in the client database, however this table has a trigger that is triggered...
asked by 04.11.2016 / 19:48
0
answers

Add-Migration Not Being Run .NET Core 2.0 EntityFrameworkCore 2.1.3

   When doing the Add-Migration "Initial" Migration classes are not being performed, can anything be related to the connection to the database? because when I run the command no error is given, and the console prompt is available to run new comm...
asked by 26.09.2018 / 21:43