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

Entity Framework 6 - Knowledge Base (KB)

131 results in tag: asp.net-mvc-3

An ASP.NET MVC 3 application has a problem filling dropdown boxes.

I have completed the new tutorial (musicstore) on MVC 3 over on ...www.asp.net.... It all went fine except for the part where two dropdown boxes should be populated from the database - and they are not....I followed the tutorial and double checked my cod...
.net asp.net-mvc-3 c# drop-down-menu entity-framework
asked by codys-hole

Error with MapSingleType

I create a project by MVC3 and use EFCode first for DataAccess Layer....in my DataBase I have PackaginInfo Table, and in project I carete Package Class, this is my code:...public class Package { public decimal PackageID { get; set; } public decim...
asp.net-mvc-3 entity-framework
asked by maryam

Creating an interface using Entity Framework

I want to use IoC with Entity framework and Ninject. I figure I need the Generated Entity classes to implement an interface, ICRUD. There's a ...walkthrough... that shows how to force Entity framework to implement an interface. I followed the direction...
asp.net-mvc-3 c# entity-framework ninject
asked by P.Brian.Mackey

In an Asp.Net MVC 3 application, how can I collect complicated child objects?

I want to be able to update a model and all its collections of child objects in the same view. I have been referred to these examples: ...http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx... and ...http://blog.stevensanderson.com/2010/01/...
asp.net asp.net-mvc-3 collections entity entity-framework
asked by Anders

Savechanges returns the latest insert id to asp mvc ()

im using poco code first . how do i get the last insert after savechanges() ?...thanks
asp.net asp.net-mvc-3 entity-framework linq sql
asked by colorblack04

MVC, EF - Per-Web-Request DataContext singleton instance in Unity

I have a MVC 3 web application, where I am using the Entity Framework for the data access. Furthermore, I have made a simple use of the repository pattern, where e.g. all Product related stuff is handled in the "ProductRepository" and all User related stu...
asp.net-mvc-3 entity-framework ioc-container unity-container
asked by Nima

MVC3 HTML. "Details" view checkbox

I find very little out anywhere about how to utilize HTML helpers to render a "Details" view. First case is I have some bit fields in SQL Server that are bools in my pocos. This all works fine for the Create and Edit views but if I want a check box to sho...
asp.net-mvc-3 entity-framework html-helper
asked by Bayrat

Using Entity Framework (.edmx Model) and Razor Views, create a dropdown list for MVC3 and insert a database record into several tables.

After reading 100's of articles on here about how to create a DropDown List in MVC 3 with Razor Views, I could not find one that fit my case....Situation:... I am ultimately trying to create a View to Add an Employee to a Database....Here is an image of t...
asp.net-mvc-3 edmx entity-framework html.dropdownlistfor razor
asked by Timothy Green

When using Entity Framework with ASP.NET MVC, how to handle mandatory fields

Let me start out by describing my app in a step by step format....First I have my Entity Framework generated model. Within it I have the following entities:...http://www.codetunnel.com/EFEntities.jpg...Now, to implement validation on an entity, I use part...
asp.net-mvc asp.net-mvc-3 c# entity-framework validation
asked by Chev

The ObjectContext object has been deleted and cannot be utilized for any activities that require a connection.

I have this view:...@model MatchGaming.Models.ProfileQuery @{ ViewBag.Title = "Index"; } <h2>Index</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.va...
.net asp.net-mvc-3 c# entity-framework exception-handling
asked by anthonypliu

SqlException (0x80131904): 'dbo.Categories' is an invalid object name.

I am getting the exception above when I run an application. The application is using asp.net mvc 3 / C#. I made an mdf file and added it under App_Data folder in Visual Web Developer Express. I added connection strings to the web.config folder but when I ...
asp.net-mvc asp.net-mvc-3 c# entity-framework sql-server
asked by user522767

Is a Controller generated for each request in ASP.NET MVC?

Very simple question: Are controllers in ASP.NET created for every HTTP request, or are they created at application startup and reused throughout requests?...Will the controller be created only for a particular HTTP request?...If my previous assumptions a...
.net asp.net-mvc-3 controller entity-framework httprequest
asked by Rasto

"non-null value of type 'DateTime'" in EF 4.1 Code First. Issue

After initial dev and testing I have now pointed my MVC3 application at an existing database which contains live data....However I am getting this error related to the field called Date1 of type "datetime"....The 'Date1' property on 'StaffAttachment' coul...
asp.net-mvc asp.net-mvc-3 code-first ef-code-first entity-framework
asked by Paul Brown

JSON Circular Reference Serialization Error in EF 4.1 - Code First

I am getting an a Circular Reference Serialization Error although, to my knowledge I do not have any circular references. I am retrieving a set of Orders from the database and sending them to the client as JSON. All the code is shown below....This is the ...
asp.net-mvc-3 c# entity-framework json serialization
asked by Guido Anselmi

The ObjectStateManager already has an object with the same key. Multiple objects with the same key cannot be tracked by the ObjectStateManager.

I have following code to add or update the Entity object. finding the object by primary key, based on the response I am adding or updating the object....Adding record works, but during update its giving this error message "...An object with the same key a...
asp.net-mvc-3 entity-framework
asked by sfgroups

Entity Framework scaffolding error with MVC 3 and ASP.Net: There are no model classes available.

I am trying to use MVC3 with the Entity framework with Code First, but the code Template generation process in MS Visual Web Developer 2010 - is not detecting my Model in the models folder - giving a message - "No Model classes are available" - although I...
asp.net-mvc-3 ef-code-first entity-framework
asked by André Vermeulen

Entity Framework Entity Property Override

I have an entity in EF named ...Profile... and I would like to add data annotation attributes to the ...FirstName... property of this entity. So, I created a new partial class like so;...public partial class Profile : EntityObject { [Required] [Di...
asp.net-mvc-3 c# entity-framework overriding
asked by Platypus Maximus

'DbContext' was not identified as a type or namespace.

I am VERY new to ASP.NET MVC (3) and am having a hard time resolving a build error in Visual Studio:...The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)...using System; using System.Col...
asp.net-mvc asp.net-mvc-3 entity-framework visual-studio visual-studio-2010
asked by Chris

Entity Framework cannot identify an assembly reference while using MVC.

I am trying to use the EntityFramework with mvc 3 in VS. I have installed the EntityFramework under references but when I attempt to use the framework in the line...using System.Data.Entity.ModelConfiguration.Conventions.Edm.db; ...I receive an red error ...
asp.net-mvc-3 c# entity-framework
asked by Bryan

In MVC Razor, how do you handle null child Entities?

I have an MVC razor view that iterates over an Orders collection. Each order has a Customer, which can be null....Trouble is, I get a null reference exception when this is the case....@foreach (var item in Model) { <tr> <td> @Html.ActionL...
asp.net asp.net-mvc-3 entity-framework razor
asked by Duncan

Page 1 of 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • »

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
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!