Questions tagged as 'entity-framework-6'

1
answer

Change only edited columns

In an application I'm developing, when trying to perform the update only on the fields that have been changed the Entity Framework is also changing the fields that do not need. Repository code: public void Update(T entity) { m_Context.En...
asked by 22.06.2018 / 00:49
1
answer

datetime vs dateime2, which one is the best?

I'm implementing a new project, using EF6 CodeFirst , EF6 creates my Sql-Server database, with date columns like datetime . What would be the difference between datetime and datetime2 , and which one is most likely to be used?     
asked by 06.04.2018 / 15:08
1
answer

Generating model from the database - table with an attribute and Inheritance

In the project I'm working on, I have the following questions: First, I made some inheritance tables in the database where each one has only one column, the id (which is pk and fk of the table to which they inherit), and when generating the m...
asked by 13.03.2018 / 15:34
1
answer

Error accessing data in Mysql with EF6

When I try to access the data in MySQL via lambda ( EF ), Visual Studio returns the following error:    Method 'MySql.Data.Entity.EFMySqlCommand.set_DbConnection (Method.Data.Common.DbConnection) failed' when trying to access met...
asked by 05.02.2018 / 00:25
1
answer

Error trying to save information to the database through the Entity Framework

My project has the following classes: public class Manifestacao { public long Id { get; set; } public string NumeroChamado { get; set; } public virtual Cliente Cliente { get; set; } public virtual List<Conteudo> Conteudo...
asked by 04.10.2017 / 16:12
1
answer

Mapping 1 to 0, 0 to 1

I need to create a mapping between two existing entities, where both are independent. Then. I have one DepositoTransferencia entity and the other one is Conta . The idea is that at a given moment, the DepositoTransferencia en...
asked by 10.08.2017 / 14:41
1
answer

EF 6 - Migrations does not reflect changes in entities

I changed my entities and circled the command Update-Database -Verbose -Script only to see in% with_% what changes would be made. Generated legal script with all changes. I closed the script window and circled the SQL , which did...
asked by 30.06.2017 / 22:58
1
answer

How to implement w3c byte range requests?

The video plays right. But I can not skip the video time. Example: Skip time from 05:00 to 10:00. It just keeps running, and I can not seem to skip the time. I searched the internet and said that it has to make flow or range or buffer....
asked by 06.04.2017 / 07:35
2
answers

ICollectionobject - how to create and use objects within the collection

I'm working on a project using MVC5 and EntityFramwork 6. I followed a tutorial to create a database from my templates. Example of a template: public class Side { public Side() { } public int ID { get; set; } public I...
asked by 13.12.2016 / 18:00
1
answer

Error in updating Registration with EF

I'm having trouble updating a record, using ef. The key conflict error with relationship. Like I've been trying to add and not upgrade.    Additional information: A referential integrity constraint violation occurred: The property value (s) o...
asked by 05.11.2016 / 21:56