Questions tagged as 'entity-framework-6'

1
answer

Unit Testing on the Controller Mocking the EF Context

I'm not able to come up with a solution on how to test my application (mockando the EF context) EF Context: public class SawluxContexto : DbContext { public DbSet<Restaurante> Restaurante { get; set; } public DbSet...
asked by 23.05.2018 / 13:32
0
answers

How to Scaffolding an Unmapped Property (NotMapped)

I'm working with a MVC 5 project with Entity Framework , where through Code First I created a template class that has a field which does not exist in the database, in the case of the ConfirmPassword field. This field should appear in a...
asked by 07.04.2018 / 23:14
0
answers

Dropdownlist asp.net mvc

I have a product that can be registered in 2 stores A and B if I have already made a registration in A how do I pro Dropdownlist show me only show option B the next time I register? How would logic be? using Entityframework and Linq? [H...
asked by 06.03.2018 / 17:49
1
answer

How to use enum with EntityFramework [duplicate]

I have a relationship of my system where one class makes a relationship with another, but this other class there is nowhere in the system to change / delete its state (they are just static data) p> I would like to know if the ideal would b...
asked by 21.02.2018 / 17:49
0
answers

Associate an entity with IdentityUser

Gentlemen, I have a category class, which must be entered by registered users. My relationship idea is 1 user can have multiple categories. I have my projects separated but related to each other according to the image below I tried t...
asked by 13.02.2018 / 18:56
0
answers

MVC + EF + daughter entity in the same edit form

I have 2 entities, one being "daughter" of the other and I need both of them to be updated in the same form. For example: public class EntidadeMae { public int Id { get; set; } public string Nome { get; set; } public IEnumerable...
asked by 07.02.2018 / 20:33
0
answers

How to ignore Entity Mapping Id with Entity Framework?

I have the following class: public class ParametrizacaoTolflux { public int CodigoModulo { get; set; } public int CodigoSistema { get; set; } public string Descricao { get; set; } public int CodigoCategoria { get; set; } } I...
asked by 07.02.2018 / 17:22
1
answer

Call the controller via javascript or ajax and insert into the asp.net mvc table

How can I get an ul li item to pass its value (id) to my controller and insert it into the table? I already have to list this code snippet below already works I can add items to the list and see text and value: $("#addPeca").cli...
asked by 03.02.2018 / 19:27
1
answer

MVC5 + Entity Framework + Form + Modal

I have an application where there is a central entity and several other auxiliary registers, such as Status, Format, Type, etc. All these auxiliary entities have only 2 fields: Name and Status (Boolean, informing if it is active or not). Since t...
asked by 05.02.2018 / 22:57
1
answer

Problem with Mysql net connector and Entity Framework

When I install the mysql connector in version 6.9.11, I can see the driver for ADO.Net, so far so good. ButwhenItrytocreatethetemplateIgetthefollowingerror: Now when I install the connector version 6.10.6, I can not see the driver for A...
asked by 05.02.2018 / 22:48