zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

17 results in tag: asp.net-mvc-4

EntityFramework when columnname changed error is Invalid column name

I am building an MVC4 application and using Entityframework. I am using code first model....My Project class is as follows:...public class Project { [Key] public int ProjectId { get; set; } public ProjectContact ApprovalContact { ge...
asp.net-mvc-4 entity-framework entity-framework-6
asked by user2739679

How to pre-compile my EF Views

Here is the story : I had a huge MVC 2 website using Entity Framework 4.0 and a few days ago, I decided to upgrade MVC 2 => MVC 4 and EF4 => EF6 and .NET Framework 4.5....I did that on a project containing about 150 controllers and more than 300 entities....
asp.net-mvc-4 entity-framework entity-framework-6
asked by Jean-Francois

MVC 4 and EF6 database first: issue with mapping

I am following along Pro ASP.NET MVC 4 by Adam Freeman on VS 2010 (I downloaded the MVC 4 template online). I have worked with the .edmx file before, but in Chapter 7 he does not do this. I setup a basic connection string with SQL Server in my web.config ...
asp.net-mvc-4 c# ef-database-first entity-framework entity-framework-6
asked by jmzagorski

Error when executing SaveChanges() with key field on Npgsql

I have a problem with my ...Npgsql... model when execute ...SaveChanges... method from a DbContext: ... A null store-generated value was returned for a non-nullable member 'Id' of type 'Easylab.DAO.Contextos.LogCad'. ...Maybe ...Npgsql... doesn't ...
asp.net-mvc-4 c# entity-framework entity-framework-6 npgsql
asked by GustavoAdolfo

Entity Framework bug? "Context changed" Error, even when not

I have gotten myself into an odd Groundhog Day scenario with an MVC application of mine.... Unless I apply my workaround (Later in this question) each time I debug the application I'm presented with this error:...The model backing the 'UsersContext' conte...
asp.net-mvc asp.net-mvc-4 ef-migrations entity-framework entity-framework-6
asked by Mike

Facing Issue while connecting Entity framework with Oracle 11g using MVC 4

I am trying to connect to an Oracle Database through Entity Framework....I have created two projects: ...A data access project...MVC4 Web project...It is working fine if I try to connect using a console application and App.config, but facing issue when tr...
asp.net-mvc-4 entity-framework entity-framework-6 oracle oracle11g
asked by AMDI

How to make optional required for differents attributes on differents inherited classes on EF6 , (businnes required rules)

How to make optional REQUIRED for the same attribute on different inherited classes on EF6. ...Why the 'required attribute' from one child is required for other child? Why does entity framework merge all data anotations to base classe 'Person' if the bas...
asp.net-mvc-4 entity-framework entity-framework-6
asked by Crivelli

Use of UpdateAsync method ASP.NET Entity Framework

My entity looks as follows:...public class AddPatientReportDentalChartInput : IInputDto { [Required] [MaxLength(PatientReportDentalChart.TeethDesc)] public string Image { get; set; } [Required] public virtual int PatientID { get; set;...
asp.net-mvc-4 c# entity-framework entity-framework-5 entity-framework-6
asked by Ashutosh Adarsh

How to pass null values into stored procedure via Entity Framework?

I am using an ASP.NET MVC 4 application with Entity Framework....I want to pass null values conditionally, let's say if pass value into ...DeptID... then it should list of values for only passed ...DeptID..., and if pass ...DeptID = NULL... then it should...
asp.net-mvc-4 entity-framework entity-framework-4 entity-framework-6 sql-server
asked by skiskd

Rename a property or give an alias name in Entity Framework?

I have a situation where I generate a table from a SQL Server database as a model with Entity Framework, but it is related with another table in the database so inside the model is also a property with the second table name like this ...public virtual ICo...
asp.net-mvc asp.net-mvc-4 c# entity-framework entity-framework-6
asked by Rajmond Burgaj

How to perform SUM operation in Entity Framework

I have a table....create table tblCartItem( pkCartItemId int primary key identity, CartId int not null, ProductId int not null, Quantity int not null, Price nvarchar(15) ) ...and I want to perform sum opeartion on that like as ...Select SUM(Price) from tb...
asp.net-mvc asp.net-mvc-4 entity-framework entity-framework-6
asked by Durgesh Pandey

Where to put savechanges in unit of work pattern with asp.net mvc?

I am using a generic repository pattern in asp.net mvc. I am familiar with repository pattern but not with Unit of work. I am reading several articles from google about this. But I am not sure if I use unit of work with asp.net mvc, where would I use Comm...
asp.net-mvc-4 entity-framework entity-framework-6 razor-2
asked by Abdus Salam Azad

An exception of type 'System.Data.Entity.Core.EntityException' occurred in EntityFramework.SqlServer.dll but was not handled in user code

I am new to ASP.NET MVC, I am facing this exception, the connection string looks perfect but still, the exception is raised, appreciate if anyone give me why is happening....Thank you guys...Model 1...namespace MVCTwice.Models { public class StudentCo...
asp.net-mvc asp.net-mvc-4 entity-framework entity-framework-4 entity-framework-6
asked by Alexander Zaldostanov

The entity type ApplicationUser is not part of the model for the current context. Used two different databases at beginning of project

I've created an MVC 4 application using entity framework to read and write data to a database I am hosting on an Azure database. The Azure database was supposed to keep the application data AND the login data for the application. ...However, when I first...
asp.net-mvc asp.net-mvc-4 azure-web-sites entity-framework entity-framework-6
asked by TheRedCameron

EF entity is not saving child property of same entity type on update

I am using ASP.NET MVC 5 and Entity Framework 6. I have a page that allows the user to enter ...Process information.... One aspect of this information is to choose from a drop down the ...Starting Process.... This class roughly looks like: ...**...public ...
asp.net-mvc asp.net-mvc-4 c# entity-framework entity-framework-6
asked by jason

How to save/update only parent entities without saving its childs entities in EF6 in asp.net mvc?

I am working on a survey application with Asp.Net MVC....I have a page named Index.cshtml which has a question table and a 'Add New' button.Once button clicked, a popup is opened with jQuery. I am calling a view from controller to fill jQuery dialog named...
asp.net-mvc-4 c# entity-framework entity-framework-6 one-to-many
asked by user6172721

How can I fix "The ObjectContext instance has been disposed "

I developed an application with entity framework. I get the ...The ObjectContext instance has been disposed and can no longer be used for operations that require a connection....error from sometimes....I did some research on the internet but I couldn't ...
asp.net asp.net-mvc-4 entity entity-framework entity-framework-6
asked by Engin Ozsozgun

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!