I've read that LINQ should be used for queries, but in the context below, the best way I found to update was using let .
var produtos = from o in orcItens
join p in Produtos on o.Id equals p.Id
let x = p.Estoque -= o.Quant...
I know that to return the values of a directly related entity in the database is done with LINQ:
List<Usuario> lista = banco.Usuario.Include("Tipo").ToList();
But how do I get the data back from another table related to the "Type" tab...
I am having problems in my bank relationship, I am developing an application that manages Courses, I am still a beginner in ASP.NET MVC. I have two Student tables and Course tables, and I have another table that links those two StudentCours...
I have done the procedures pointed out in these questions:
Entity Framework - Bank Compatibility
MySQL Connection Error asp.net MVC
I installed MySQL.Data.Entities.
My web.config looks like this:
<connectionStrings>...
Well, I have my application and every client will have their own database.
As each client will have its database, it will also have its user table for login.
So I have
BancoEmpresa1 - User / Password: [email protected]/123
BancoEmpresa2...
In ASP.NET MVC & Entity Framework , because many examples and some open-source projects we find a unit of work together with repository pattern and DbContext is already a unit of work, including projects with IoC and DI...
I need to make a composite primary key relationship in the entity framework using the entities themselves.
public class ProjetoDocumento
{
public Projeto Projeto { get; set; }
public Documento Documento { get; set; }
}
I have an application with EF5 using EDMX modeling and I have much more experience and affinity with Code First. Does anyone have any idea / tutorial on how to migrate from EDMX to Code First without changing the database and entity classes?
...
Dear friends, I have a view that contains only @model Projeto.Models.Oc and a form . Within this form , I have buttons that call MODAL , these MODAL have partialView , @model Projeto.Models.Rc , etc.
I wanted to...
One thing that many are looking for but there is no feature available in versions from EntityFramework to 6 is the use of unique keys ( unique keys ).
Including users asking how to create such a control and the incredible is that a...