Questions tagged as 'entity-framework'

0
answers

Entity Framework Conflicting changes to the role of the relationship have been detected

I have 2 objects that use a third party in common and I have a problem in the routine: 1) Creating a new Manufacturer var fab = new Fabricante(); DBSet.Add(fab) //Sem SaveChanges Then searching for the existing item and creating a new...
asked by 14.08.2018 / 22:56
0
answers

Id jumping 1000 Sql server 2014 (localDB)

In my application a few times when I'm going to add some data to the database, the ID jumps to 1000 units. I found some solutions, but they do not work for me because I use EF6 with code-first and my intention is to install the application wi...
asked by 27.08.2018 / 16:35
2
answers

LINQ (LAMBDA) How do I add another list of objects and add them to my where? W#

Good afternoon, I'm doing an application in C # .Net Core, using lambda for database context handling. I have one question, which is as follows: I have a list of objects with these two attributes: Name and StartDate. Something like: List<Op...
asked by 02.07.2018 / 18:58
0
answers

Use Union Select Entity Framework

I'm trying to use a Union select, in an entity framework, but I'm not able to merge the information, here's what I'm trying to do: var un = _context.CaixaMovimentos.Select(c => new { c.Data, c.Hora, Histórico = c.Histor...
asked by 12.07.2018 / 19:09
2
answers

Error creating ASP.Net Core 2.0 database - Keyword not supported: 'initial catalog

Hello, I'm trying to create a database with SQL Server using the Entity Framework Core, but it has the following error: Keyword not supported: 'initial catalog'. Does anyone know what it can be? { "ConnectionStrings": { "DefaultCon...
asked by 21.06.2018 / 04:02
0
answers

Application wpf with entity framework does not work on another machine

I have a wpf application with entity framework and sql server express ... it works perfectly on my pc, but when I try to install on another computer it does not work ... the application does not create the database with the frst code of the enti...
asked by 05.06.2018 / 01:49
0
answers

How to use the GraphDiff Entity Framework Code First

I have the following tables in my database: Sale Sales Details Products Sales Plots The relationship is as follows: 1 Sale = > N Sales Details 1 Sale = > N Products Sales 1 Sales Details = > N Plots I'm trying to...
asked by 11.06.2018 / 14:31
1
answer

Relationship of one column to several

I have an entity class of Medical name, in which it has an IDMedical column. It relates to the Attendance entity class, which in turn has a MedicalID column, which would be a foreign key of that first. There is also in this table, Attendance,...
asked by 18.05.2018 / 18:32
1
answer

How to get the percentage of Postgre database storage space through EF Core in Asp.net Core

I need to create in my application a feature that checks the database ( PostGreSQL ) for the percentage of storage space used to be displayed on a chart. I have a generic repository, and I thought about creating a GetStorage() fu...
asked by 19.03.2018 / 00:07
0
answers

Add field of decimal type entity framework [closed]

I have a Repair table on it, I have ValueObject, ValuePart, and ValueObject all of a decimal type. The field ValueTotal = ValueOfOblock + valuePart. But this is returning 0. I am showing this in the detail view when I click I will see the repair...
asked by 31.01.2018 / 20:54