Questions tagged as 'entity-framework'

1
answer

Lambda with different contexts

Is there any way of joining two or more tables using Lambda and two different contexts?     
asked by 06.06.2014 / 17:37
1
answer

Update on 2mil records Customers how to do a single update instead of 2k separately

I have a Client Model and need to update on EnviadoEmailCobranca para 0 I'm doing this: var clientes = db.Clientes.Where(w => w.Status == 4); foreach (var item in clientes) { item.EnviadoEmailCobranca = false;...
asked by 10.03.2016 / 16:14
4
answers

How do I implement an ObjectSet wrapper that works with LinqToEntities?

I need to create a wrapper for ObjectSet to be able to create a centralized access control. The goal is to implement the CA without making changes to queries already in the system, which in this case are scattered throughout the code...
asked by 06.02.2014 / 13:51
1
answer

Best Practices when modulating an application with EF and multi-bank

Let's say I want to model an application in .NET using EntityFramework as ORM and use one of its advantages, be "generic" for several RDBMS . So, for example, I want my application to accept working with Firebird ,...
asked by 09.05.2014 / 03:23
1
answer

Strange property initialization

When reading a tutorial on Entity Framework, I came across an example code where there was a line that, for me, is unknown: Student stud = new Student() { StudentName = "New Student" }; I understand that a new object of type Student...
asked by 02.05.2016 / 16:29
1
answer

How to map an image attribute by Fluent API?

I would like to know how to map an attribute of type image of SqlServer to the Fluent API. In my database I have the following table: CREATE TABLE [dbo].[ProdutoFotoERP]( [ProdutoFotoID] [int] NOT NULL, [Produt...
asked by 11.10.2016 / 18:54
1
answer

How to support columns added by the user without updating the EF model?

I have a C# application with a Entity Framework 6 "Database First" model created from the base structure of a SQL Server database, which belongs to third-party software. Users of this software can add user fields to some tables by de...
asked by 15.04.2014 / 16:39
1
answer

SQLServer Portuguese Error Messages - (LocalDB) \ v11.0

I'm developing an application with Entity Framework 6 using the Code-First approach. I want to configure SQLServer (LocalDB) \ v11.0 to display error messages in Portuguese without using SQL Server Management Studio . From the researc...
asked by 23.04.2014 / 15:24
1
answer

Many Update to Many Entity Framework C #

Good morning, I'm having trouble updating a record with entityframework, I'll tell you the whole structure below. In short, I have a register of artists, where these artists are related to address and categories. An artist can have an addr...
asked by 02.02.2016 / 15:02
1
answer

Problem saving a change using Entity Framework

I'm trying to persist a change I make in a registry, but I'm getting this error:    System.InvalidOperationException: 'A referential integrity constraint   violation occurred: The property value (s) of   'UnitMedida.UndMedidaId' on one end of...
asked by 31.05.2017 / 15:19