Questions tagged as 'entity-framework'

0
answers

As a popular ReportDataSource () object in a webform.aspx form?

As an example, below is the example of the Entity, Interface, Repository, and MVC System Controller. Following the code of formulário webform.aspx I use to display Pedido usando o ReportViewer , the problem is that when I try to dis...
asked by 16.10.2016 / 21:35
1
answer

Modify generic method to merge information into classes

I am a first-time sailor with EntityFramework and am working with a USUARIO class that inherits from PESSOA . There are other classes like PESSOATIPO , PESSOAFISICA , PESSOAJURIDICA , etc., the problem is that w...
asked by 06.11.2016 / 15:00
1
answer

List reservations by Administrator

I'm trying to list my reservations by different admins. However, the way I did, he lists all the reservations. This is the method I'm using: public ActionResult Index() { Administrador administrador = db.Administradores.FirstOrD...
asked by 24.09.2016 / 03:07
0
answers

Error Entity Framework class mapping from existing database

I have a SQL Server database and have the mapping classes automatically generated from the existing database. However, when I run the application, it gives the following error:    (404,10): error 3015: Problem in mapping fragments starting at...
asked by 14.07.2016 / 02:21
1
answer

Entity Framework Code First. How to generate two banks from two projects, with the second project using classes from the first

Speak up! I have a question regarding Entity Framework 6. I have two projects A and B, A being a shared core. It has some classes like Parents, State, City, Address etc. In project B, I have some classes like Candidate, Vacancy etc....
asked by 04.07.2016 / 19:00
0
answers

Error trying to insert data from a mixed table

I'm starting an MVC project and I'm having a problem that I can not fix. [Table("InfoGeralEmpresa")] public class InfoGeralEmpresa { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInC...
asked by 08.06.2016 / 23:11
1
answer

List Entity Framework

I am creating action from Edit to edit the data of my models . What happens is that I use ViewModel to "join" several models into one. Okay, I can get data from models which are not List<> , ie models that are not a li...
asked by 09.06.2016 / 05:32
0
answers

Error with the EntityFramework provider

This is the message that is returning in the browser The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invar...
asked by 10.05.2016 / 16:11
1
answer

Azure Published API Error

I have an error in an ASP.Net API with Entity Framework and MySql, on my machine the application runs without problem accesses the database and shows the results, however when I publish in Azure the application generates an error: "Object refere...
asked by 29.04.2016 / 16:59
1
answer

Entity Framework - Error ObjectStateManager

I'm getting the following error when trying to update an entity in EF: {"An object with a key that matches the given object's key could not be found in ObjectStateManager. Please verify that the key values of the supplied object match the key...
asked by 04.05.2016 / 14:07