Questions tagged as 'entity-framework'

0
answers

Insert data with Entity and no field identity

I have this method to insert into the database: public virtual void Inserir(T item) { contexto.Set<T>().Add(item); contexto.SaveChanges(); } And I have this in my Product entity, for example:...
asked by 17.08.2017 / 00:07
2
answers

Error Multiple object sets per type are not supported

I have an error in my application. I am working with Identity for user authentication but calling Controller created is returned the following error:    Multiple object sets per type are not supported. The object sets 'Users' an...
asked by 30.07.2017 / 18:21
1
answer

Error: Could not process type 'xxx []' because it does not have any known mappings at the value layer

In the controller I have my session built. public const string ListaPermissao_SessionName = "ListaPermissao"; private List<ListaPermissao> ListaPermissaoEnvio { get { if (Session[ListaPermissao_SessionName] == null)...
asked by 06.07.2017 / 16:34
1
answer

Error in Migrations EntityFramework C #

Error while performing Migrations.   The ADO.NET provider with invariant name 'SqlClient' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details. My App.Config <...
asked by 22.06.2017 / 21:46
1
answer

Entity Framework - Fluent API - Error

I'm following this tutorial . When creating the class below gave an error: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Domain.entities; using System.Data.Entity.Mod...
asked by 18.06.2017 / 01:58
1
answer

Popular DataGridView with Entity Framwork

I have in SQL Server a database called STORE; In this database I have a table named Functional, it contains 5 columns being respectively: Name, CPF, DataAdmission, DataDemission, In my C # application I have already made the connection to th...
asked by 09.06.2017 / 03:58
1
answer

Sort by Reflection with GetProperty

I have a generic class with a method that needs to sort a generic object. However, giving error saying that it does not recognize the Reflection GetProperty method, since lambda can not translate. How can I do this sort order logic? publ...
asked by 24.06.2017 / 07:41
1
answer

Entity Framework database access

I have a C # .NET application developed with Entity Framework, but I can not access the database with the following message:    The underlying pdovider failed to Open. I have only the application, but no local or remote database, how woul...
asked by 28.05.2017 / 16:34
0
answers

Parameter ignored in EF 5.0 TimeOut Connection

My application is experiencing a TimeOut error when executing operations that require more processing time. I am using EntityFramework 5.0 and set Connection Timeout=480 to test, but it seems to me that it is ignoring the...
asked by 20.04.2017 / 16:51
1
answer

Updating the SQL database in the MVC project

I made a column change in my BD SQL in my ASP.NET MVC project. I changed a column from Cliente_RG (INT) to Cliente_Bairro (String) . In SQL it was OK to change. In the project, in all tables (I think) the associations were change...
asked by 06.05.2017 / 15:33