Questions tagged as 'entity-framework'

2
answers

The requested .Net Framework Data Provider could not be found. Sql Server + Entity

I'm having trouble connecting to my local bank. This is my View , where I try to connect the bank using Razor: @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_LayoutOuvinte.cshtml"; var db = Database.Open("Entities"); v...
asked by 16.03.2015 / 22:38
1
answer

List method does not return objects

Method with EF     List internal List<Arquivo> GetAllArquivo() { using (var ctx = new TESTEntities()) { var arquivos = ( from ver in ctx.ARQUIVO select new Arquivo()...
asked by 10.02.2015 / 12:37
1
answer

Error saving data from a session in the database

I'm developing a sales system. Follow the link: Save Request - ASP.NET MVC But when I finish the purchase and save the data in the database, I get the following error:    "An entity object can not be referenced by multiple instances of I...
asked by 03.12.2014 / 21:51
1
answer

How to map a table without PK with entityframework?

Everyone! in my project, I'm having trouble mapping a primary keyless (PK) table, the application is breaking, when I implement the table in the MAP of my project. public class Configuracoes { public int MaximoFilas { get; set; }...
asked by 12.03.2015 / 18:36
1
answer

Get Model in the View with values coming from the database

I have this class: public class MontaArvoreAcao { public int IDRuptura { get; set; } public DateTime DataRuptura { get; set; } public int IDMotivo { get; set; } public string Motivo { get; set; } public int IDOrigem { get;...
asked by 15.09.2014 / 13:37
1
answer

Write fk shortly after pk is generated with entity

I have a system and in this system there are some tables that are associative. As soon as I write to the DB the main table, I need to ensure that the new PK generated is written to three other tables, but you have to ensure that it is generated....
asked by 28.08.2014 / 18:34
1
answer

Left Join statement in LINQ to entites

I tried to do a left join in LINQ as follows: (from opr in db.Operacao join vol in db.Volume on new { VOL_CODBAR = opr.OPR_CODBAR } equals new { VOL_CODBAR = vol.VOL_CODBAR } into vol_join from vol in vol_join.DefaultIfEmpty() select new {...
asked by 22.12.2014 / 18:10
1
answer

LINQ with Left Join and Multiple Keys

My LINQ query does not give an error but does not display any results. Where did I go wrong? using (var db = new MyEntities()) { var result = (from dc in db.DiarioClasse join fn in db.Faltas on new { dc.Matricula, dc.CdD...
asked by 18.09.2014 / 17:40
1
answer

Entity Framework without primary key

I have the following problem: Whenever I update the model diagram of my project, it loses the reference of which field is the primary key, even I try the PK in the table in my Bank. Anyone have any idea what might be causing this?   ...
asked by 18.09.2014 / 20:22
1
answer

Working with Entity Framework, Multithreading and SQL Server in C #

I'm using Entity Framework and Multithreading in a C# project and I'm experiencing connection problems with SQL Server . Well, I wanted to improve the speed of data searches for a grid because they are very time-consuming...
asked by 13.10.2014 / 21:14