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)

293 results for: in tag: asp.net

Entering keys manually with Entity Framework

I'm trying to use Entity Framework code first for a simple database project and I run into a problem I simply cannot figure out. ...I noticed EF was setting the ID for my tables automatically increasing by 1 each time, completely ignoring the value I ente...
asp.net c# entity-framework entity-framework-core sql
asked by JCafe

Best practices for integrating ASP.NET Identity - do they exist?

I'm using ASP.NET Identity with a new website and there don't seem to be many (any?) examples of how to do this in a decoupled manner. I do not want my domain model's ...DomainUser... class to have to inherit from ...Microsoft.AspNet.Identity.EntityFramew...
.net asp.net asp.net-identity entity-framework entity-framework-6
asked by joelmdev

Dynamic MySQL database connection for Entity Framework 6

I wish to pass a dynamic connection string to the entity framework context. I have over 150 schemas which are identical (one per account) and I would like to select the connection as such:...ApplicationDbContext db = new ApplicationDbContext("dbName"); ..
asp.net c# entity-framework entity-framework-6 mysql
asked by francisco.preller

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

Code First Mapping to Database Views

I have been asked to map the ASP.NET Identity classes to existing database Views for read operations, using Stored Procedures for CRUD. There are a number of StackOverflow Questions stating that ...is possible to map to views..., also ...this question...,...
asp.net code-first entity-framework entity-framework-6
asked by pwdst

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

Foreign Key Lookup Dropdownlist EF 6

I have been googling for 3 days, and can't find a usable answer, I'm hoping someone can help me....I'm starting with this EXCELLENT tutorial:...http://www.asp.net/web-forms/tutorials/data-access/model-binding/retrieving-data...I'm trying to extend this pr...
asp.net drop-down-menu entity-framework entity-framework-6 webforms
asked by user3311566

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

Delete a list of items in Entity Framework

I am trying to clear all items from an Entity Framework collection, in this case, remove all food from a plate. Any ideas how I can resolve the following - The code below generates the error: ...An exception of type 'System.InvalidOperationException' occu...
asp.net c# entity-framework entity-framework-6
asked by dynamicuser

How can I turn off Entity Framework 6.1 logging?

The documentation states that I can turn on logging like this:...using (var context = new BlogContext()) { context.Database.Log = Console.Write; // like this context.Database.Log = logInfo => Debug.WriteLine(logInfo); // or l...
asp.net asp.net-mvc entity-framework entity-framework-6
asked by user1464139

ASP.NET vnext and open database

is there some possibility to work with an open database like mysql, mariadb or other and ASP.NET vNext? ...Perhaps a beta driver or something like that?
asp.net asp.net-core entity-framework-core
asked by Patrik

What is the difference between ExecuteSqlCommand vs SqlQuery ? when doing a db access?

I have had a couple of suggestions on how to access data from my database:...var allMyIds = context.Database.ExecuteSqlCommand("select id from AspNetUserLogins"); var allMyIds = context.Database.SqlQuery<string>("select id from AspNetUserLogins")...
asp.net c# entity-framework entity-framework-6 sql-server-2012
asked by Samantha J T Star

I want to use Entity Framework + ASP Identity but I don't want EF to generate tables for me

I have created new ASP MVC 5 app (with asp identity).... I use ...IdentityDbContext... class to put all my domain objects inside....public class SecurityContext : IdentityDbContext{ ... public DbSet<Country> Countries { get; set; } ...When I first time cr...
asp.net asp.net-identity c# entity-framework entity-framework-6
asked by 1110

Entity Framework mapping between ASP Identity user and other tables - change Id column

I have a standard ...Identity... user in my app......public class ApplicationUser : IdentityUser<int, ApplicationUserLogin, ApplicationUserRole, ApplicationUserClaim> {... ......Which has ...Id... as primary key. ...How can I change ...Id... to UserId?...
asp.net asp.net-identity c# entity-framework entity-framework-6
asked by 1110

Entity Framework 6 with Mysql and NullReferenceException

When I try to insert same data I am getting NullReferenceException exception....I have read tons of posts in Stackoverflow, asp.net forums and mysql community forums. I could not found any true solution for this problem. There is a lots of answer about t...
asp.net c# entity-framework entity-framework-6 mysql
asked by Dreamcatcher

Entity Framework 6: Adding child object to parent's list vs. setting child's navigation property to parent

I have an existing database with two tables ...MailServers... and ...MailDomains... in it. ...MailDomains... has the foreign key column ...MailServerId... pointing to the ...Id... primary key column in ...MailServers.... So we have a one-to-many-relations...
asp.net c# entity-framework entity-framework-6
asked by Joerg

How do i map a column to another table in entity framework?

Lets say i have two classes,...public class UserBio { [Key] public string Id { get; set; } [Required] [Display(Name = "First Name")] public string FirstName { get; set; } [Required] [Display(Name = "...
asp.net asp.net-mvc c# entity-framework entity-framework-6
asked by Irshu

EntityDataSource and Entity Framework 6

I am learning ASP.NET. I came to EntityDataSorce control. I am using EF6. I have read that this control and EF6 have some issues, conflicts, but with the last update to EntityDataSource this issue has solved. ...http://blogs.msdn.com/b/webdev/archive/2014...
asp.net c# entity-framework entity-framework-6
asked by Omer K

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