Questions tagged as 'entity-framework'

1
answer

Precision scale using Entity Framework and SQL Server

I have noticed some strange time saving values double in the SQL Server database with the Entity Framework. I noticed that when reporting a value ex: 12.23 after saving the information is breaking the decimals in more houses ex: 12.225...
asked by 08.08.2016 / 22:22
2
answers

Recursion in the entity-framework

I'm starting in C # and I'm having some difficulties with the Entity-Framework. I have the following scenario: public InstituicaoMap() { // Primary Key HasKey(t => t.IdInstituicao); // Properties Property(t => t.Nome)...
asked by 03.05.2016 / 18:09
2
answers

Problem to execute "Update-Database"

I'm following the tutorial for this video to set up an ASP.NET MVC project using EntityFramework6. The database used in the tutorial is SQLServer and what I'm trying to use is MySQL. I already have the MySQL Connector installed. I was ab...
asked by 09.07.2015 / 04:09
2
answers

How to get data from two tables in the same column?

I have two tables in the database: Tabela1 Id Nome Sexo 1 NomeA Macho 2 NomeC Fêmea Tabela2 Id Nome Sexo 1 NomeB Macho 2 NomeD Fêmea I would like to have the following re...
asked by 30.07.2015 / 18:54
2
answers

Error when querying EntityFramework

I'm having a problem with a request, in the controller when I make the query in the products table the following message appears when I debug, I click on an icon and it does not return any data, but the table has data and I put it to return all:...
asked by 13.12.2018 / 17:02
2
answers

EF with TPT inheritance and audit fields

Hello. I have already looked for answers in the TPT and Entity tags but I have not found anything similar. My problem is when trying to use an inheritance model (TPT) where tables have fields with the same name (example: DataCadastro...
asked by 17.02.2016 / 14:29
2
answers

Application Security Change for Medium Trust

Recently I uploaded a system I created in Asp.Net using MVC and Entity to the KingHost web server. On localhost and on my own server it works normally. When trying to access the application on the KingHost server, it gives the following error:...
asked by 22.01.2015 / 12:30
2
answers

Remove objects from memory

I have DataGridView in my project and a timer refresh of 5 seconds. I realized that the system was overloading the memory, because every time I list the previous data, they remain in memory. This is the code I use to list: Using (DBE...
asked by 03.02.2015 / 12:19
1
answer

How to concatenate fields in linq and rename

I made a linq and it is not working the concatenation and the rename of it. See: var monta_arvore = (from rup in db.Ruptura from apr in db.Apresentacao.Where(ap => ap.Codigo_Apresentacao == rup.Codigo_Apres...
asked by 09.09.2014 / 21:38
1
answer

Instantiating the database context in the controller

Hello, I have a question related to the instancing mode DbContext the controller. What's the difference between the two methods below instantiation? 1. private ApplicationDbContext _db; public ApplicationDbContext db { g...
asked by 07.02.2018 / 14:21