Questions tagged as 'entity-framework'

0
answers

Error Publishing Locaweb - ASP.NET with MySql

I posted a site on Locaweb: .Net + MySql + MVC 4 + EF6 For more details on the error: link Detail: Location runs normally. But when I published, the following occurs: 'Cannot perform CAS Asserts in Security Transparent methods'    ...
asked by 23.07.2015 / 08:20
0
answers

How to improve the loading of related entities using LinqKit?

Hi, I'm using LinqKit to stack "Expression Predicates", so I need to do a "foreach" to do the entities Load related and this is being very costly for application because to load 1000 records is taking in average 4 minutes. Is there any way to...
asked by 28.05.2015 / 05:49
0
answers

Call EF entity by name and perform dynamically search [closed]

In the WindowsForm application I'm developing, I want to create only a%% default for listing the records that will be called through the system's logs menu. This form of listing, in addition to the include, edit and delete buttons of...
asked by 03.05.2015 / 15:10
0
answers

update-database command does not work in multiple contexts

I have two context in my project. I followed the instructions in this Article where it shows how to have 2 context in the same project. Each context is for separate banks, so they are 2 ConnectionString How...
asked by 20.05.2015 / 19:50
1
answer

Linq Query dynamics between two contexts

I'm trying to return the following sql query but to no avail. SQL= select IDEstado, COUNT(IDEstado) from PessoaEstado w join Nucleo.dbo.Estado e on e.ID = w.IDEstado where IDPessoaMaster = 46 group by IDEstado Code= var dbApp = new App(); v...
asked by 16.05.2014 / 22:28
1
answer

System.OutOfMemoryException - When Entity Framework is querying very large data of type Varbinary

I'm trying to query a varbinary field that contains a 1.2 Gb file, using Entity Framework . See below: Test database CREATE TABLE [dbo].[BIGDATA]( [id] [bigint] IDENTITY(1,1) NOT NULL, [BIGDATA] [varbinary](max) NULL, CONSTRAINT...
asked by 07.07.2014 / 16:52
3
answers

NullReferenceException error in join

I created a join in LINQ to create a List : (from p in listaProcedimento join pd in oListaprocedimentodetalhe on p.codigo equals pd.codigoProcedimento into pd1 from pd2 in pd1.DefaultIfEmpty() select new ProcedimentoDe...
asked by 02.08.2017 / 13:42
2
answers

How to check if the email is already registered in the database?

The Controller is always returning the error message when the email is registered in the database. [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "Id,Nome,Email,Senha")] Pessoas pessoas) { if (pessoas != n...
asked by 26.10.2018 / 18:29
2
answers

Saving an attribute for image [closed]

I need to save an image and let's say I have something like: namespace Projeto.Models { public class Usuario { public int UserId { get; set; } public String Nome { get; set; } public ? Foto { get; set; } }...
asked by 06.01.2016 / 20:47
2
answers

Many-To-Many Update EntityFramework does not work

I have a N: N relationship between Activity and Project, where an activity has many projects: public class Atividade : ObjetoPersistente { public Atividade() { StatusAtividade = EStatusAtividade.NaoIniciado; TipoAtivid...
asked by 20.07.2015 / 21:01