Questions tagged as 'entity-framework'

0
answers

Problems with ObjectStateManager when updating a Model

I'm having trouble updating a model, the code below is working correctly when I give GET in a context model edit on the screen (View) and give a submit all ok but when I have a data grid where I load several messages and for example I will check...
asked by 01.10.2015 / 07:26
3
answers

dynamic dropdown list and bd image return does not work

Dropdown dynamic list and database image return does not work after the application is published in IIS. When I inspected through the browser I had the following error:    HTTP Error 404.0 - Not Found (with following request: link )...
asked by 27.08.2015 / 18:13
0
answers

How to find out the type of relationship between two tables

Hello, people I would like to know a way, or rather, if I can find through a SELECT, the type of relationship between two tables wanted me to return. SELECT TABELA_PRINCIPAL, TABELA_RELACIONADA, COLUNA_PRINCIPAL, COLUNA_RELACIONADA, TIPO_RE...
asked by 18.08.2015 / 07:06
1
answer

Entity Framework and WCF Navigation Property

I'm trying to implement a WCF service that will return a Model that I also use in the Entity Framework. When the model has a virtual property of navigation for association with another model WCF can not parse the object and ends up returning an...
asked by 23.08.2015 / 02:54
0
answers

forein key reference, with the Entity Framework

To have a difficulty doing an insert , because the EF indicates that there is an error in the table reference. But in my config , I indicate what is the foreing key . My config: public class TestDriveConfig : EntityTypeConfiguration<T...
asked by 14.08.2015 / 19:52
1
answer

The member with identity 'Phase_Target_Project' does not exist in the metadata collection

I'm having a very strange error ... I do not make the least of it. This is my class: public class FaseProjeto { public int IdProjeto { get; set; } public int IdFase { get; set; } public virtual Projeto Projeto { get; set; }...
asked by 09.06.2015 / 16:30
0
answers

MVC + EF Application with N-Layers

I'm working on an MVC project with EF 6, and I'm having a rather curious problem, in some ViewModel, the object that comes from my DbContext does not seem to persist and I get the generic message System.NullReferenceException. The curious thi...
asked by 23.06.2015 / 02:07
1
answer

DataAnnotation Validations Do Not Work on Properties with NotMapped Attribute in EF6

I upgraded the Entity Framework version from 5 to 6 in my project, and the Data Repository Context.SaveChanges stopped working in only a few cases. I found that using DataAnnotation in properties of my template that contained the [NotMapped]...
asked by 11.06.2015 / 19:11
0
answers

Foreign key Entity framework 6

Someone can help me make a connection between these two tables, I want to use the registration field to make this connection, and enrolling in the student table is not the primary key. public class Aluno { [Key] public int IdAluno...
asked by 05.09.2015 / 17:49
0
answers

Remove () from Entity Framework 6 only works when re-creating the connection

I'm creating an application using EF6 and I came across a problem. I'm using the repository concept, and when I run a delete (context.remove (obj)) and after that I reload the list and the datagrid, I realize that delete has not yet worked. So d...
asked by 27.02.2015 / 13:26