Questions tagged as 'entity-framework'

1
answer

C # + Entity + MySQL = The underlying provider failed on Open

I have a problem when I host my system on locaweb. My system is done in C # asp.net MVC3 with EF and MySQL. This problem occurs only in locaweb, I already checked the connectionstring and everything is with login and password. System.Securi...
asked by 05.01.2016 / 01:16
2
answers

Association 1 to 1 Entity

I have a relationship between Address and Academy where 1 address has 1 gym, and 1 gym has 1 address. Academy Class: public class Academia { [Key] public int AcademiaID { get; set; } ... //relacionamentos public int Ende...
asked by 19.01.2017 / 03:40
1
answer

How to create master-detail form using a ViewModel

I have a viewmodel in my project. Inside it I have two entities which are a list of items. I'm doing the data-editing logic for these entities that are within the viewmodel . I have 5 entities in all. The ones that are not a list, I get th...
asked by 20.06.2016 / 04:44
2
answers

Using distinct with Entity Framework

I have an object with a structure something like this: Date Description I'm thinking a distinct() in the description field because the records are ridiculously repeated. The question is, does distinct() only consider th...
asked by 17.12.2015 / 17:35
1
answer

Doubt in studying the Code First development approach

I am currently studying the development approaches used in the Entity Framework 6 approaches Model First and Database First I found the content on the internet easily and I understood, but the Code First approach is really complicated...
asked by 17.12.2015 / 18:34
1
answer

WebMethod with Data Model

Good morning, I would like to receive a data model in a method from my webservice, what is the correct procedure for me to get it? I'm trying the code below but it's not working. namespace UI.Web { [WebService(Namespace = "http://tempuri.o...
asked by 17.12.2015 / 14:14
2
answers

Inheritance X Composition - MySQL C # Entity

I was having a question of inheritance modeling in C # involving Person, Individual, and Legal entity, but Cigano Morrison Mendez helped a lot! Now I have another question in another type of relationship. As I said, a person may be physical or l...
asked by 10.03.2016 / 23:42
1
answer

Create Linq query - EF List with n sublists

I have a list with N results, I would need to make some changes in linq so this list would return N lists of only 3 underlying results. Any idea?     
asked by 23.02.2016 / 14:19
1
answer

Filter by group and minimum value

I have the following table: ********************************* * IdPessoa * DataVen * Observ * * 10000000 * 01/01/15 * Teste1 * * 10000001 * 01/01/15 * Teste2 * * 10000000 * 01/01/12 * Teste3 * * 10000001 * 01/01/13 * Teste4 * * 10000001...
asked by 10.08.2015 / 16:09
1
answer

How do I add more than two conditions to an Expression dynamically?

I need to pass a list of Expressions as a parameter and create the 'Ands' as dynamically as possible. So, whenever I add a new Expression to the list, I will have to change the class that mounts Expression as well. Para...
asked by 21.08.2015 / 15:47