Questions tagged as 'entity-framework'

1
answer

Error connecting to MySql using EF6

I'm getting the error    'System.Data.StrongTypingException: The value for column' IsPrimaryKey 'in table' TableDetails' is DBNull Whenever I try to connect to a MySql database using Entity Framework 6. Any tips to fix?     
asked by 07.04.2017 / 01:56
1
answer

Connection Entity Framework with Mysql

I have done the procedures pointed out in these questions: Entity Framework - Bank Compatibility MySQL Connection Error asp.net MVC I installed MySQL.Data.Entities. My web.config looks like this: <connectionStrings>...
asked by 07.11.2014 / 02:54
0
answers

Value shown in production other than development

I have an application in ASP.NET MVC with the Entity Framework with an Oracle database, and it is showing some wrong data, and this happens only in production, in Debug (locally) the data is brought right . This data is written from another s...
asked by 05.04.2017 / 14:38
1
answer

Validate Business Rule

I am using this example tutorial Data Repositories to create a layered crud with the Entity Framework with Code First. My question would be how to validate a business rule where a user with login already exists in the database can not be re...
asked by 05.04.2017 / 04:07
1
answer

Connection Problems between the Entity Framework and the Database?

When I run my application I'm encountering the following error when loading data through Entity Framework . When it runs I notice that the following connection string is called:    In it I notice that a different username an...
asked by 21.03.2017 / 15:30
5
answers

How to solve accentuation problems with ASP.NET MVC?

I'm having problems with accentuation in ASP.NET MVC 5. I'm using Visual Studio 2013 Professional and the .Net 4.5 application. SQL Server 2008 and Entity Framework 6. The browser is Google Chrome upgraded and Windows is 8.1. Example: W...
asked by 03.03.2014 / 00:22
2
answers

Entity Framework is saving duplicate values when saving entities with relationship N to N

I have an entity called Book that has among other attributes a list of categories. In my model a book can have multiple categories and vice versa, so we have a N relationship for N. The EF therefore creates the books table, the category table an...
asked by 12.02.2014 / 22:21
1
answer

Many-to-many Relationship Query with LINQ to Entities

I've created a database that has two tables called Teachers and Courses . A teacher can teach in many courses and a course can have many teachers. I've created the Teacher Courses table to match both. When using the Entity Framework wizard...
asked by 09.12.2016 / 23:54
0
answers

Filter with two DropDowList ASP.NET MVC 5

I would like to make a filter with two DropDownList . In the first filter are filtered the Units registered and in the second the Functions registered in that unit, with their respective Employees. The end result would be the list of Emplo...
asked by 01.12.2016 / 18:25
1
answer

C # Entity DbSet with DDD?

I have an application C# MVC with DDD and in repository I'm making the call like this: return DbSet.Include(i => i.Cliente).FirstOrDefault(a => a.ProcessoId == processoId); DbSet-> is in repositoy...
asked by 08.12.2016 / 20:44