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)

6940 results

How to identify Dbcontexts (to prevent singleton context for entire application)

I was wondering how do you scope out your Dbcontexts in Entity Framework so you don't use a single Dbcontext for your entire application. I am new to Entity Framework and have been reading tutorials, but they all used a single Dbcontext as an example, so ...
asp.net-mvc c# entity-framework
asked by Alex

How do I retrieve the row number using Entity Framework and LINQ?

Hope someone can help me out here as I'm a little stuck....I'm building a service in front of a hiscore database for a game....The database have the following two tables:...CREATE TABLE [dbo].[PB_HiscoreEntry] ( [Id] UNIQUEIDENTIFIER NOT NULL...
count entity-framework row
asked by Mads Laumann

From the EF Code-First DbContext class, create a SQL CE database.

I've defined a set of classes in the style of Entity Framework Code-First conventions and annotated the class properties with System.ComponentModel.DataAnnotations attributes....Now I want to generate a SQL Server Compact Edition (SCSE) (4.0) database fro...
.net code-first ef-code-first entity-framework sql-server-ce
asked by Bent Rasmussen

MVC3 list passing from view to controller

I'm trying to create a tagging system for my project. I need the pass a string (for ex: "test1, test2, test3") which will be binded to an entity as a list. ...I'm using EF and my view inherits an entity, defined in EF. Without creating a view model, is it...
asp.net-mvc c# entity-framework
asked by Kaan

Is stored procedures supported by Entity Framework Code First?

I've watched several presentations of EF Code First and haven't seen how EFCF works with stored procedures....How can I declare a method that will use some sp? Can I pass an entity to a method that calls sp without manually mapping entity properties to sp...
c# code-first entity-framework stored-procedures
asked by frennky

On the property of the split Entity Data Model, the Data Annotations [Required] attribute is required.

I'm using the ...Table Splitting... feature of the Entity Framework to split my Entity Data Model as follows:...+--------+ +--------------+ | News | | NewsImages | +--------+ +--------------+ | NewsID | | NewsID | | Text | | Ima...
asp.net-mvc c# data-annotations entity-framework
asked by Marius Schulz

Change notice for underlying data (in database) in Entity Framework

I'm using the Entity Framework to manipulate data in a database with success so far....However, I would like to have more than one application playing with the data at the same time (concurrent edition)....Is there a way to get notified when the data in t...
c#-4.0 entity-framework notifications
asked by Nicolas

This Command is already paired with an open DataReader in Entity Framework.

I am using Entity Framework and occasionally i will get this error. ...EntityCommandExecutionException {"There is already an open DataReader associated with this Command which must be closed first."} at System.Data.EntityClient.EntityCommandDefinition....
entity-framework linq sql-server-2008
asked by Sonic Soul

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

How do I tell a property to create a TEXT column instead of a nvarchar? (4000)

I'm working with the Code First feature of Entity Framework and I'm trying to figure out how I can specify the column data types that should be created when the database is auto-generated....I have a simple model:...public class Article { public int A...
c# data-annotations ef-code-first entity-framework sql-server-ce
asked by Mark Bell

Manually drop and create DB in EF CodeFirst CTP5?

For testing purposes I would like to manually be able to drop and recreate a DB using EF CodeFirst CTP5. How would I do this?
entity-framework
asked by BenGC

When is it OK to utilize a CompiledQuery?

I have a table:...-- Tag ID | Name ----------- 1 | c# 2 | linq 3 | entity-framework ...I have a class that will have the following methods:...IEnumerable<Tag> GetAll(); IEnumerable<Tag> GetByName(); ...Should I use a compiled query in this case?..
asp.net c# compiled-query entity-framework
asked by BrunoLM

What does the "Pluralize or singularize produced object names" option mean?

When setting up a new Entity data Model, there is an option to...[x] Pluralize or singularize generated object names...I have noticed this is an option in LINQ as well. Also, now that I am studying the ADO.NET entity framework, I noticed it also has 'DEFA...
ado.net ado.net-entity-data-model c#-4.0 entity-framework
asked by user287745

How can I use Entity Framework code to update a row first?

How should I go about updating a row in the database? There is no update method, and if I use add and the primary key id already exists, I get an exception. Please provide an example if possible.
code-first entity-framework
asked by Ryan

One-to-many code-first reference

I have the following two tables:...LOCALIZATION...Id int Text string ...DINER...Id int Name string Description string Name_LocalizationID int Description_LocationID ...
code-first entity entity-framework fluent-interface
asked by sadhat75

In a T4 template file, how do I validate the datatype of a property in an entity?

I am customizing my .tt file in EF 4.0. Now as part f customization I need to add some code to a property in POCO class generation, if the property type is ...Nullable<System.DateTime>... or ...System.DateTime.... I am not able to find the proper syntax f...
c# entity entity-framework t4 templates
asked by WPFProgrammer

The LINQ to Entities Union throws an exception.

I have managed to get the following working:...var transactions = from t in context.Transactions group t.Create_Date_Time by t.Participation_Id into t1 select new { ParticipationId = t1.Key, Cre...
c# entity-framework linq linq-to-entities
asked by manu

Linq conversion instructions. Linq to ParallelQuery IQueryable

var transactions = from t in context.Transactions group t.Create_Date_Time by t.Participation_Id into t1 select new { ParticipationId = t1.Key, CreateDate...
c# entity-framework linq linq-to-entities linq-to-objects
asked by manu

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

For the present context, the entity type classname> is not included in the model.

DB has a table ...PackagingInfo.... I have a ...Package... class, and a ...ShopEntities : DbContext.......// Entity (ex. Package.cs) [Table("PackagingInfo")] public class Package { public decimal PackageID { get; set; } public decimal Title { get;...
ef-code-first entity-framework
asked by maryam

Page 31 of 347
  • ««
  • «
  • …
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • …
  • »
  • »»

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!