Questions tagged as 'entity-framework'

0
answers

How to transform my query into a Linq query?

I need to mount this query on Entity select ped.Id, prot.Prot_numero as Protocolo, ori.Descricao as Sistema, cla.Id as Equipe, cla.Descricao as Finalidade, forn.Nome as Fornecedor from Pedidos ped join Protocolo prot on ped.ProtocoloId =...
asked by 14.06.2018 / 14:37
0
answers

Doubt Json MVC Core Razor

I created a method to perform a Insert through Ajax , like this: function SalvarHorario() { //NomeHorario var nome = $("#Nome").val(); var token = $('input[name="__RequestVerificationToken"]').val(); var tokenad...
asked by 29.05.2018 / 00:34
1
answer

How to display data from multiple tables in DataGridView?

I'm trying to display multiple tables in DataGridView , from a database I mapped through the Entity Framework . Example, person table, address. I tried to use pessoa.BindingSource , then comes the address list, but I could not...
asked by 08.06.2018 / 23:26
1
answer

Error connecting to the database using the Entity Framework

I'm creating a WPF application, and I decided to use EntityFramework to perform the operations in my bank. I created a data model from an existing database in my MySQL Workbench, and the process was executed correctly, exporting all the tables a...
asked by 30.05.2018 / 19:55
1
answer

Problem with EntityFramework - An entity object can not be referenced by multiple instances of IEntityChangeTracker

I have a project where a dropdownlist is loaded with the following statements: var lista = entities.prato.OrderBy(x => x.nome).ToList(); combo.DataTextField = "nome"; combo.DataValueField = "id"; combo.DataSource = lista; combo.Data...
asked by 15.05.2018 / 15:44
1
answer

EF Core 2 + Relationships between tables

Hello, I'm starting a project, and I started using the new EF Core for the first time because of the performasse, but there are still some things I did not find on the internet that I would like to do. In my project I have 3 classes Users...
asked by 17.05.2018 / 19:17
0
answers

Automatically generate procedures with field type table-type in the Entity-framework

I'm trying to generate an existing database for Entity-framework 5, I managed to generate without problems, with all the relationships but in that database I have procedures that receive as a table-type parameter but when I'm going to call those...
asked by 02.05.2018 / 20:06
0
answers

Autofac: No scope with a matching AutofacWebRequest tag

I'd like your help to solve the following problem: Imagine that I have a ServiceFactory class responsible for creating services (as srvFact.Create<MyService>() ), a RepositoryFactory class responsible for creating repositories (as...
asked by 03.05.2018 / 12:56
0
answers

Asp.Net MVC Inner Join statement return pre-defined values if the search does not produce results

I have the following statement in the controlller public JsonResult GetLote(DateTime dataAbate, int numeroSequencia) { db.Configuration.ProxyCreationEnabled = false; var query = from a in db.Lotes join b in db.LoteGeneros on a.Lot...
asked by 16.04.2018 / 15:51
3
answers

Linq filttar elements of LEFT JOIN

I would like to return an object with your children, but only wanted to bring the children that corresponded to a certain condition. ex: I have the following classes: public class Fornecedor { public int FornecedorID { get; set; }...
asked by 11.11.2016 / 17:29