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

Entity Framework Core - Knowledge Base (KB)

289 results for: in tag: asp.net-mvc

Azure + EF 6 - Making code first migrations work

I am using EF 6 (code first with migrations) for MVC 5 project. On my local DEV machine everything works fine....But when I deploy my project to Azure, I get the following error when my app first tries to interact with the database:...Migrations is enable...
asp.net-mvc asp.net-mvc-5 azure entity-framework entity-framework-6
asked by Moon

How can I get my MultiSelectList to bind to my data model?

I have a many to many relationship between cars and many other tables. In my view I want to be able to have a multiselect list for items such as lights. I've tried many different formats I can't seem to get the list to set selected items.My preferred way ...
asp.net-mvc asp.net-mvc-5 c# entity-framework entity-framework-6
asked by Bob

EF code first Invalid column name

I'm currently working on my own simple CMS using MVC to familiarize myself with MVC and EF. ...At this time I've only got pages which can contain multiple paragraphs. In the database I've got 1 page (Home) and 1 paragraph. ...On the index view of home I'm...
asp.net-mvc asp.net-mvc-3 entity-framework entity-framework-6
asked by Jop

How to integrate ASP.NET Identity tables in an existing database

Using Asp.net 4.5 and VS 2013, I would like to know how to integrate Asp.Net Identity Tables with an existing database....So basically I would like to have db tables for Identity and my own tables in the same db....I know Asp.Net Identity use Code First a...
asp.net-mvc entity-framework entity-framework-6 sql-server
asked by GibboK

What is the difference between IdentityDbContext and IdentityDbContext<ApplicationUser> in MVC5

On what basis should one decide to use ...IdentityDbContext... versus ...IdentityDbContext<ApplicationUser>... in an ASP.NET MVC5 application?...What benefits do we get by using ...IdentityDbContext<ApplicationUser>... instead of the non-generic ...Identi...
asp.net asp.net-mvc asp.net-mvc-5 entity-framework entity-framework-6
asked by Sandeep Kumar

How do I make a group of multi-select checkboxes in ASP.Net MVC with c# enum?

I need to make a set of checkboxes where a user can select 1 or more markets. I would normally use a set of boolean values to accomplish this as it would be pretty strait forward and in my mind not take up much space in the database or take that long to l...
asp.net-mvc asp.net-mvc-5 c# entity-framework entity-framework-6
asked by Bob

Entity Framework Seeding with Identity (Microsoft.Owin.Security) user

I have a class that seed the database which add 2 users with roles and custom fields. The problem I have is that it save the data in [dbo].[AspNetUsers] instead of [dbo].[IdentityUsers]. Both tables are created. When seeded, the data go into AspNetUser. W...
asp.net-identity asp.net-mvc entity-framework entity-framework-6
asked by Patrick Desjardins

How can I use Entity Framework 6 and my repository to delete multiple records?

I am using Entity Framework 6 and I have a repository looking like the following with the Add and Update methods removed to make it shorter:... public class GenericRepository<T> : IRepository<T> where T : class { public GenericRepository(DbContext dbC...
asp.net-mvc entity-framework entity-framework-6
asked by user1943020

Getting a the new value of RowVersion using Entity Framework 6

Is is possible, to get the new value of RowVersion using the same DbContext, without reloading the entity from the database?...Scenario:...Load data into editor form...Save new values...The row in the table gets updated, new value of RowVersion is generat...
asp.net-mvc asp.net-mvc-5 entity-framework entity-framework-6
asked by Tadej Mali

Does a many-many relationship in EF6 require the mapping table to be defined and to have a primary key?

Does an EF6 table used for many to many require a primary key and do I have to create a class for that many to many table? I have seen two ways of creating a many-many table now. The one that's been answered here in this question:...How do I name a many-m...
asp.net asp.net-mvc entity-framework entity-framework-6 many-to-many
asked by user1679941

How can I use EF6 to update a many to many table

I have two classes:...public partial class ObjectiveDetail { public ObjectiveDetail() { this.SubTopics = new List<SubTopic>(); } public int ObjectiveDetailId { get; set; } public int Number { get; set; } public string Text { ge...
asp.net asp.net-mvc c# entity-framework entity-framework-6
asked by Alan2

Entity Object attached/not attached to dbContext

I have the following EF data statement :...class Model1{ public Int32 Id{ get; set; } public string Prop1 { get; set; } public string Prop2 { get; set; } public string Prop3 { get; set; } public virtual Model3 PropModel31{ get; set; }...
asp.net-mvc c# entity-framework entity-framework-6
asked by Yooz

MVC5 EF6 CodeFirst use two database for debug and release

I have a project of intern website for my company. I use MVC5 with Entity Framework 6 on a Code First project....It's an Intranet for my company so I want two database. 1 in production (release). 1 in dev (Debug)....I've edited the Web.config, Web.Debug.c...
asp.net-mvc asp.net-mvc-5 c# entity-framework entity-framework-6
asked by Saesee

Deleting child objects with EF6

I'm new to EF6, its a side project for me and I'm struggling to see how to delete / modify child rows. I'd normally hand crank this stuff but I'm investigation increasing productivity....I have the following providing JSON to my knockout model....public J...
asp.net-mvc c# entity-framework entity-framework-6 knockout.js
asked by RubbleFord

EF6 (code first), MVC, Unity, and a service layer without a repository

My application is using SQL Server 2012, EF6, MVC and Web API. ...It's also using a repository and assorted files such as:...DatabaseFactory.cs Disposable.cs IDatabaseFactory.cs IRepository.cs IUnitOfWork.cs RepositoryBase.cs UnitOfWork.cs ...We already u...
asp.net asp.net-mvc entity-framework entity-framework-6
asked by Samantha J T Star

Using the Unity IOC to inject dbcontext into my controllers and service layer?

How can I inject my dbcontext into the service layer with the Unity IOC. In particular I want to be sure that I only have the one dbcontext and I want to ensure this is destroyed at the right time even if I am using async....My application uses EF6 and a ...
asp.net asp.net-mvc entity-framework entity-framework-6 unity-container
asked by Samantha J T Star

Adding ViewModel class adds codefirst model to database

I need a view-model in my ASP.NET MVC 5 project, but when I added one to the models folder, a new entity was added to the database and I was forced to add a migration and update my database. I do not want this to happen, as it is a view-model I am adding ...
asp.net-mvc asp.net-mvc-5 c# entity-framework entity-framework-6
asked by Jason James

Why is UserManager.CreateIdentityAsync() looking for IdentityRole and how to fix?

I'm using ...Identity2.0... with ...MVC5...CodeFirst... I have extended both the ...IdentityUser... and ...IdentityRole... like this:...public class ApplicationUser : IdentityUser { [Required] [StringLength(50)] public string FirstName { get; ...
asp.net-identity asp.net-mvc asp.net-mvc-5 entity-framework entity-framework-6
asked by Sean Newcome

Why is there an implementation difference between the UserStore and the RoleStore?

This has no problems:...public class ApplicationUserStore : UserStore<ApplicationUser, ApplicationRole, string, ApplicationUserLogin, ApplicationUserRole, ApplicationUserClaim> { public ApplicationUserStore(MyAppDb context) : base(context) ...
asp.net-identity asp.net-mvc asp.net-mvc-5 entity-framework entity-framework-6
asked by Sean Newcome

Entity Framework 6 - Multiple lookup inserts vs An object with the same key already exists in the ObjectStateManager

I am apparently having a real devil of a time understanding Entity Framework 6 which I am using with ASP.NET MVC 5....The core of the matter is that I have a really quite simple data model that is typical of any real world situation where I have various b...
asp.net-mvc asp.net-mvc-5 c# entity-framework entity-framework-6
asked by user3464861

Page 1 of 15
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

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