Questions tagged as 'entity-framework-6'

1
answer

Problems when adding a new record

Hello again community, I am learning entity framework and I do an exercise where I keep a file with x documents and that document has x images. When wanting to insert new documents to an existing file, I have the following error:    An...
asked by 07.12.2017 / 18:54
1
answer

Get data from a many-to-many relationship with EF and web-api

A simple question but I do not give. I have a many to many relationship between two Citizen entities and Topics (which is generated from the Citizen, Topics and CitizensTopics tables) And I have a Web-Api service from which I want to obtain t...
asked by 13.11.2017 / 17:39
1
answer

Values by default MVC with entity framework and stored procedures

I have a stored procedure for saving records that has default values. Guardar(@ID int, @autor varchar (20)='anonimo',@isbn int,@titulo varchar(25)='TBD', @descripcion varchar(250)='N/A') public virtual int Guardar(ObjectParameter ID, strin...
asked by 13.07.2017 / 16:26
0
answers

SaveChanges entity framework 6 error with two entities

I'm trying to save an entity Note from the controller -> servicio -> repository and it gives error of DbEntityValidationException and I paint it by screen but then I am saving the statistics of the web and when I tried to do...
asked by 14.07.2017 / 14:36
1
answer

Delete record in table with relation much to much EF 6

I am trying to delete a record from an intermediate table, that is, from a table with a many-to-many relation. I would like to know how I can delete a record from that table because when I try to save the record I do not get an error, but the re...
asked by 01.07.2017 / 02:59
1
answer

How to send a procedure stored in the controller in ASP.NET MVC and Entity framework

I have this code in my controller and my stored procedures are already mapped. I access the database through Entity framework and the edmx is defined. I would like to know what the code is like to send (use) my stored procedure to...
asked by 22.06.2017 / 18:32
1
answer

Problems connecting to sqlserver using entityFramework

I have a project that I just started with entityframework6 in code first mode I did my few and generated the tables but when trying to run unit tests entityframework tries to connect locally instead of going to where I'm specifying with my conte...
asked by 07.06.2017 / 16:56
1
answer

Problem when using EF6 c # class error

Hi, I'm new to c # I'm trying to use EF6, but when I insert it, it gives me this error that I attached in the image namespace sng01 { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System....
asked by 01.05.2017 / 21:15
0
answers

Record related entities EF6 c #

I have a structure in the DB (sql server) in which I have a main entity (patient) and other related (medicines, clinical parameters, activities, etc) is a one-to-many relationship, understanding that it could become that For example, have zero o...
asked by 29.05.2017 / 04:20
2
answers

Entity Framework 6 SaveChanges Extremely Slow

I am making an application in WPF, and I use Entity Framework v6.1.3 as ORM, database sql server 2012 as a database. The query is simple. Make an insert of 8 thousand records approximately, it takes me more than 15 minutes. What really takes...
asked by 02.02.2017 / 17:46