Questions tagged as 'entity-framework'

3
answers

How to get the amount of "true"?

Follow the code below: int total_true = ctx .MinhaTabela .Where(x => x.id == 5) .Select(x => new Tabela_DTO { Campo1 = x.Campo1, // database está como true Campo2 = x.Campo2, //database está como false...
asked by 31.07.2018 / 19:47
1
answer

Connection String C # EntityFramework [closed]

I would continue a work from home project, the Connection String that works is as follows: <add name="DBModel" connectionString="data source=PD_22;initial catalog=EXERCICIO_ENTITY_JOSEEDUARDO;user id=login;password=senha;MultipleActiveResu...
asked by 23.10.2016 / 20:26
1
answer

Is it possible to use MySQL with Entity Framework 6 and get good performance of CRUD? [closed]

Is it feasible to use MySQL with Entity Framework 6 and get good performance from CRUD?     
asked by 13.04.2015 / 23:29
2
answers

Only allow 5 attempts on the EntityFrameWork key duplication? to 6 on SaveChange ()

In key duplication when burning with EntityFrameWork in competition with many users, it only allows 5 attempts and in 6 SaveChange () tag (example 1). If it is with SqlConnection it does not give a problem (example 2). Example 1: Public...
asked by 17.02.2017 / 13:07
1
answer

Doubt in the construction of WS REST (Contract)

Gentlemen, I took an example in the book of John Sharp (Microsoft Press) to build a REST and came up with a simple question but a question of good practice. It uses the Northwind BD. It creates a Class Library project and points this project...
asked by 12.05.2014 / 14:28
1
answer

Result of foreach behaves unexpectedly

I've been working on a page, where I need to create a treeview system with checkbox and this is consuming a lot of my time and leaves me worried about the project SLA. In the controller, there I have a LINQ that returns everything I need on the...
asked by 18.09.2014 / 15:45
1
answer

Help convert SQL into LINQ

I want to convert the code select to a query LINQ SELECT bpac.cmp FROM bpac union SELECT bpai.cmp FROM bpai group by cmp order by cmp desc I'm trying to get the first table and I'm already getting error: List<string> l...
asked by 02.10.2018 / 15:43
1
answer

Data not being loaded in the Table

Good afternoon, I would like to know how I can make my list of records be loaded into the table at the same time that the chart is loaded by AJAX, because currently in my model it shows that it has records but they do not appear in the table,...
asked by 20.07.2018 / 20:53
1
answer

How to update a User entity that is converted to application?

Code: public int UpdateUser(User usr) { db.Users.Attach(usr.ToApplication()); db.Entry(usr.ToApplication()).State = System.Data.Entity.EntityState.Modified; return db.SaveChanges(); }    Error:   "Attachi...
asked by 23.06.2016 / 15:06
1
answer

Error creating entity framework

IhavethisproblemwhentryingtocreatetheEntityFramework:  Unabletogeneratethemodelbecauseofthefollowingexception:  'System.ArgumentException:Theargument'name'cannotbenull,empty  orcontainonlywhitespace.at  System.Data.Entity.Utilities.Check.NotEmp...
asked by 17.11.2016 / 04:34