Questions tagged as 'entity-framework'

2
answers

Data Annotations in a form do not work

I have a form to persist data with entity framework , I put DataAnnotations to my model, but still I do not validate the values, I do not see the messages of error , if I do not put nothing in the name field or in the select...
asked by 09.06.2017 / 20:20
2
answers

Update Entity Framework 6 Objects disconnected Entities 1: N (One to many)

I'm making an application and I use Entity Framework 6 to access SQL Server. I have the following case, where I want to update the value of two entities: Socio - > SocioDireccion A partner can have many addresses. Firs...
asked by 23.11.2016 / 10:38
1
answer

I can not connect to MySql with Visual Studio 2013 to work on Asp.net MVC 4 web and in E.F

I want to connect to a database with entity framework to a database with MySql yog Ultimate, but it does not work for me. Start by adding the dlls: And I even add the following to the webconfig:         But it does not show the MyS...
asked by 17.08.2016 / 15:26
1
answer

Implementing IRepository in IUnitOfWork

Hi, how can my UoF interface inherit from IRepository? having this: public interface IRepository<T> where T : class, IDisposable IoW public interface IUnitOfWork : IRepository { int Save(); }     
asked by 01.04.2016 / 18:00
1
answer

Connect to an IBM DB2 database from ASP.NET Core

I need to access an AS400 db2 database from an ASP .Net 5 or Core application. Try with entity framework through the following packages link Following the documentation on this page: link But it did not work, I presented error...
asked by 01.04.2016 / 23:22
3
answers

Do not update property in BBDD from Controller

I need to show in a View (Web form) a property of the Data Model that comes from a DB and that after performing the Submit, the Controller's action does not perform the Update on those fields in the DB but with the rest of properties of the Mode...
asked by 11.05.2016 / 12:08
1
answer

Fill a DropDownList depending on a conditional query in asp.net mvc 5 entity framework

Hi, I have to fill out a dropdownlist with the information that this query gives me. Select Unit from Unit Measures where Status = 'Active' This query should bring me the units that have the active state but I do not know how to implement...
asked by 27.12.2018 / 19:35
1
answer

Error Deployment WCF windows server 2012

I am making a deployment of some services WCF , when consuming the services; in a server it works correctly, but in another server in which it must be deployed, it is throwing me the following error: The type initializer for 'Compensar.C...
asked by 03.02.2016 / 16:30
1
answer

Entity Framework can not find 'System.Data.SqlClient'

After installing and uninstalling EF 6.1.3 in several projects of my solution, when I wanted to use it I had the following problem:    No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Ma...
asked by 27.01.2016 / 14:25
0
answers

How to know the type of field in the database with EntityFramewors C # [UWP]

I just have a table: CREATE TABLE Parametros( Empid int NOT NULL CONSTRAINT [FK_Parametros_Empid] REFERENCES Empresa(id), Codigo varchar(25) NOT NULL, Valor sql_variant NULL, CONSTRAINT [PK_Parametros] PRIMARY...
asked by 17.10.2018 / 18:54