Questions tagged as 'entity-framework-6'

0
answers

Saving a Many-to-Many Relationship with Entity Framework

Questions when inserting objects into the database when using Entity Framework 6 + C # WPF. I have 3 objects, ServiceOrder, Service, and ItemsOs. with the following structure: public partial class OrdemServico { [System.Diagnostics.Code...
asked by 22.12.2017 / 00:20
1
answer

At what point does the Entity Framework query an IQueryable?

I'm developing a method for an API that consists of the following: fetch all evaluations from a given client and, if specified, limit the amount of records that will be returned. For example: public IEnumerable<Avaliacao> GetAvaliacoe...
asked by 16.02.2016 / 21:50
1
answer

How to import records file in asp.net mvc with entity framework [closed]

I would like to ask a question and I do not know how to structure my need .. I need to import / export a file with records, and depending on each record will be from a different table with their references and etc. What file formats is right?...
asked by 17.11.2017 / 19:07
2
answers

System Settings in static class in the Entity Framework

I'm trying to create settings for a system. I thought of a class similar to the example: Class: public static class Configuracoes { [DisplayName("Casas Decimais")] [Description("Informa o número de casas decimais que o sistema...
asked by 31.10.2017 / 02:27
0
answers

Error generating migration after changing a relationship

I'm having an error changing a many to many relationship in the entity framework I had 3 classes: Policy 1-n Normative Policy n-1 Normative I did not want to map this auxiliary table in the hand, so I deleted the class PoliticalNor...
asked by 29.08.2017 / 14:37
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

Bulk Insert with Entity Framework 6

I have a project where the user selects a txt or csv file, and the system reads line by line passing the fields to an entity. The first time, it executed SaveChanges() of the bank context with each line of the file. But this was taking to...
asked by 05.07.2017 / 18:24
0
answers

Working with Entity Framwork and Sql Express Database

I have an application with a connection to the database and I need to create an installer that contains the database script so that it is installed together with the application or at some point in the first execution. How to create an installer...
asked by 14.06.2017 / 21:28
1
answer

Separate Asp.Net Context Context and Application Context

I'm creating a repository using the Entity Framework, and the need arose for my entities to communicate with the IdentityUser entity of Identity, but Identity is in a separate layer of my application layer.  Is it possible to create two contex...
asked by 16.06.2017 / 04:09
0
answers

Transaction with Entitiframework 6.1.3 and PostgresSql does not work correctly

I'm trying to use EntityFramework6.Npgsqlcom transaction, however I get an exception when I call the DbContext.UseTransaction method and step a transaction. Error message (Last InnerException):    "Npgsql.PostgresException (0x80004005):...
asked by 21.05.2017 / 17:50