fluent-api

Error running update-database migration

I'm trying to run my database creation, but I'm getting this error below and I'm not understanding the reason: The type ... )); modelBuilder.Configurations.Add(new EnderecoConfiguration()); base.OnModelCreating(modelBuilder); }

Mapping relationships with Fluent API

I have three simple classes of city, state and country. I realized that simply declaring a property of type Estado in class C ... I did not realize if there is a difference from the state to the city and vice versa. I don't know if I'm doing things right.

What is the difference between Data Annotations and Fluent API?

What is the difference between Data Annotations and Fluent API? Is there any restriction between one or the other? Improve performance or are they just two ways to do the same thing?

Code First generating a foreign key

I have the following classes public class ControleDeVisitas { public virtual ICollection<TipoDeSistemas> TipoDeSi ... ControleDeVisitas"); HasKey(c => c.ControleDeVisitasId); HasMany(c => c.TipoDeSistemas); }

IDENTITY INSERT is set to OFF-Entity Framework Core

I am working on an application with ASP. net-core + entity-framework-core and with mapping and configuration via fluent-api ... > m.Registros) .WithOne(m => m.Material) .OnDelete(DeleteBehavior.Restrict); } What am I doing wrong?