Questions tagged as 'entity-framework-core'

1
answer

Where does not work when listing all records - Entity Framework

I need to return all records that contain the informed branch using the where clause, but the Entity Framework is returning all records ignoring what is in where . Where am I going wrong? public IQueryable<PessoaGenerico> Ge...
asked by 19.08.2018 / 22:53
0
answers

IDENTITY_INSERT is set to OFF - Entity FrameWork Core

I'm working on an application with asp .net-core + entity -framework-core and with mapping and configuration via fluent-api . When I insert into the database I get the error that IDENTITY_INSERT is set to OFF . Follow the Im...
asked by 16.08.2018 / 21:05
2
answers

Code-First Fluent API with complex classes in ASP.NET Core 2.1

Error while performing Add-Migration when using ComplexType classes. public class Cliente : EntityBase { public Cliente() { #region Create HashSet Properties Lists Dependences Titulares = new HashSet<ClienteC...
asked by 15.08.2018 / 19:02
0
answers

Performance and dynamism with the NET CORE 2.1 contexts

I'm creating an api with asp net core 2.1 and I can not use identity , I know that it already has a whole library built for user manipulation and everything else, however, , in my project I can not use it. Contextualized, I would like to know i...
asked by 08.08.2018 / 23:04
0
answers

Foreign key Identity EF

I have the following class of UserData and I want to use the User ID generated in Identity EF as foreign key. How do I pull this data, which I'm doing with Migration. namespace AgendaWeb.Domain.Users { public class UserData {...
asked by 12.08.2018 / 21:59
1
answer

Types Conversion with Fluenti API in EF Core 2.1

I wonder if you can do the following conversion: public class Pessoa { public bool Ativo { get; set; } } public class PessoaMap: IEntityTypeConfiguration<Pessoa> { public virtual void Configure(EntityTypeBuilder<TEntity>...
asked by 02.08.2018 / 18:26
1
answer

EF Core 2 + Relationships between tables

Hello, I'm starting a project, and I started using the new EF Core for the first time because of the performasse, but there are still some things I did not find on the internet that I would like to do. In my project I have 3 classes Users...
asked by 17.05.2018 / 19:17
0
answers

EntityFramework Core 2, update date in every update

I have a scenario where my template has the fields CreatedOn and UpdatedOn and following what I found in the EF Core documentation I implemented my class as follows builder.Entity<Registro>(b => { b.Property<Dat...
asked by 19.04.2018 / 22:48
1
answer

Mask with ASP.NET Core MVC

I'm doing a job for college with asp.net core MVC , and I'm using entity to generate the view and queries in the BD. I need to put masks in the fields like CNPJ. I got searching on Google how to put mascara, but when I try to create a recor...
asked by 20.03.2018 / 02:57
0
answers

Entity Code First Migrations can not find Microsoft.EntityFrameworkCore.Design

Hello, I'm working on a dotnet 4.5.1 project using EntityFramework with CodeFirst Migrations, I've added 1 new field to an entity and I'm trying to add a new migration, however the following error message appears: N�o foi poss�vel carregar arqu...
asked by 14.02.2018 / 13:49