Questions tagged as 'entity-framework-6'

1
answer

Query Return - Generic Repository Entity Framework

I have a generic repository and I realized that it is taking a long time to return a query with the selection of some columns of my database, the Query () method is as follows: public IList<T> Query(System.Linq.Expressions.Expression<...
asked by 26.04.2018 / 13:24
1
answer

Entity Framework with Oracle

I'm trying to use EF, using Code Frist, along with an Oracle database, so I'm using the Nuget package Oracle.ManagedDataAccess.EntityFramework , however whenever I try to run Update-Database it gives the following error message:    Sy...
asked by 14.07.2017 / 04:54
1
answer

Exception DbUpdateException

I'm trying to study EF with Code First. I'm getting this exception at SaveChanges() An unhandled exception of type System.Data.Entity.Infrastructure. DbUpdateException occurred in EntityFramework.dll Additional information: An erro...
asked by 02.09.2015 / 03:26
2
answers

Entity Framework and parameterized constructor

When I create domains, I usually create a parameterized constructor for it: namespace Models { public class Unity { public string Abreviation { get; set; } public string Description { get; set; } public Unity (...
asked by 27.05.2016 / 22:57
1
answer

Code First Migrations MySQL - Specify the '-Verbose' flag to view the SQL statements being applied to the target database

I'm creating a Web application in C # and for the sake of the hosting server, the database is in MySql. So I installed MySql.Data.Entity, EF6, I activated Migrations, added the class Migrations, but at the time of giving Update-database -Verb...
asked by 03.07.2015 / 07:42
1
answer

problem with update Entity Framework 6

This is my upgrade method: public dynamic Atualizar(TEntity obj) { dynamic data = null; using (ClassContexto ctx = new ClassContexto(ClassMaster.conexao())) { try { ctx.Entry(obj).State = EntityState.Mod...
asked by 14.04.2015 / 21:05
2
answers

Include EntityFrameWork

I'm working with Entity Framework 6, I made all the necessary settings. I have a Person Class that owns a Property of the Type Address, inside address I have a property Municipio that by the end has a property of Type UF. I have a function that...
asked by 27.06.2014 / 21:43
1
answer

Questions about column formatting in the gridView

Hi, I have some questions about formatting columns in a gridview, I have a gridview that populated by data coming from a table in the database, the columns and row are automatically generated, I have a method that performs the query in the gridvi...
asked by 15.06.2014 / 22:14
1
answer

How to get the specific type of error returned by EntityFramework?

Following the question: How to intercept exceptions when working with the Entity Framework? Is it possible to get some type of error identifier? For example, Primary Key Violation, Foreign Key Inconsistency, and in my specific case, when it...
asked by 13.06.2014 / 03:52
1
answer

How to disable Migrations from a project with EF6?

Hello I have a class library with templates using Code First and I enabled Migrations with the "enable-migrations" command in PMC to test and it works very well. Since I'm at the beginning of the model definitions, I'd rather leave it for aft...
asked by 21.04.2014 / 20:29