Questions tagged as 'entity-framework-core'

2
answers

Lazy Loading EF Core, load daughter entities and subfiles?

I have a Web Api that I am developing using DotNet Core and EF Cor but it has Lazy Loading active, but in some cases I need to load daughters entities and daughters of daughters , I created a generic repository to...
asked by 27.02.2018 / 14:13
3
answers

EF Core - Partitioning Filter

I'm working on a database that has the following characteristic, a 90% clustered index that integrates two columns: FilialID and DataCriacao . These tables are partitioned by FilialID , simple creation or removal of a Fi...
asked by 15.05.2017 / 20:02
2
answers

What is the proxy creation in the entity framework?

What is the purpose of disabling this feature?     
asked by 02.01.2018 / 12:01
1
answer

Entity Framework 7, Insert or Update

I've been looking for a method to check if an object exists on the base, if it exists, execute a update , if not, insert . I did not find anything that would answer me, so I made the following code: public static void InsertOrUp...
asked by 17.12.2017 / 23:32
1
answer

How to create an object in a Linq.Expressions.Expression and dynamically add properties to it in C #

Hello, I am creating a DataAnnotations library to extend the EntityFrameworkCore with structures that today only exist using FluentAPI. In one of them, I'm trying to recreate this block from FluentAPI: using Microsoft.EntityFrameworkCor...
asked by 11.12.2018 / 17:37
1
answer

Auto Relationship with Entity Framework 2.2

How do I make an Auto Relationship with EF Core 2.2? I found a link that teaches how to do with EF, but in EF it does not have the WithOptional method. public class Menu { public int Id { get; set; } public string Title { get; set;...
asked by 12.12.2018 / 17:44
1
answer

How to control migrations two different contexts?

I have two contexts and would like to know how to activate each of them. For example Add-Migration Contexto 1, Add-Migration 2 How can I add new migrations for each context?     
asked by 10.01.2018 / 09:55
1
answer

Entity Framework Core 2.0 - Add-Migration does not work

I'm creating a new code-first project. When trying to create the migration, using the [Add-Migration Initial -Context LogAuditoriaContext] command it simply does nothing, does not create, does not give error, does not report anything: I have...
asked by 27.12.2017 / 14:43
0
answers

Error generating Migrations EntityCore for MySQL [closed]

Next I'm trying to use the new EFCore, and with MySQL, I've installed the following packages nuget :    Install-Package MySql.Data.EntityFrameworkCore-Pre   Install-Package Microsoft.EntityFrameworkCore.Tools -Pre using the followin...
asked by 22.09.2016 / 02:30
1
answer

Include in the Entity Framework from an Enumerable

I have the following entities: public class Rota { public Rota() { CidadesRotas = new List<CidadesRota>(); } public int RotaId { get; set; } public string Descricao { get; set; } public string Observacao {...
asked by 23.08.2018 / 21:20