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

In EF, get the name of an EntitySet from an EntityType.

Given an EntityType, such as "Contact", how can I derive from it the name of the EntitySet it would belong to, i.e. the pluralization such as "Contacts"?
entity-framework
asked by CodeGrue

What's the difference between Entity Framework, LINQ to SQL, and ADO.NET with stored procedures?

How would you rate each of them in terms of:...Performance...Speed of development...Neat, intuitive, maintainable code...Flexibility...Overall...I like my SQL and so have always been a die-hard fan of ADO.NET and stored procedures but I recently had a pla...
ado.net entity-framework linq-to-entities linq-to-sql sql
asked by BritishDeveloper

Mocking ObjectContext in EF4 for unit testing?

Can it be done without using TypeMock Islolator? I've found a few suggestions online such as passing in a metadata only connection string, however nothing I've come across besides TypeMock seems to truly allow for a mock ObjectContext that can be injected...
entity-framework mocking objectcontext typemock
asked by Steve Macdonald

Using HTML, create an empty textbox. An EF entity's TextBoxFor on a not-null attribute

I am using Entity Framework (v4) entities. I have an entity called Car with a Year property of type integer. The Year property does not allow NULL. I have the following in my Create view:...<%= Html.TextBoxFor(model => model.Year) %> ...I am required to r...
asp.net-mvc-2 entity-framework
asked by thd

How can I use Visual Studio 2010 Express to connect to SqlExpress for Entity Framework?

I'm trying to use the Visual Studio 2010 Express editions to set up an ASP.NET MVC 2 Web Application using SqlExpress + Entity Framework as the data access. I have both the "C# Edition" and "Web Developer Edition" installed....If I try to add a data sour...
entity-framework sql-server-express visual-studio-express
asked by Mike

EntityFramework in parallel

Is it possible to make some work in parallel with entity framework for following example?...using (var dbContext = new DB()) { var res = (from c in dbContext.Customers orderby c.Name select new { ...
c# entity-framework parallel-processing
asked by mehanik

In Entity Framework 4, how do I map a composite main key first?

I'm getting to grips with EF4 code first, and liking it so far. But I'm having trouble mapping an entity to a table with a composite primary key....The configuration I've tried looks like this:...public SubscriptionUserConfiguration() { ...
composite-key entity-framework orm
asked by jamesfm

How to use Entity Framework's GetDate() method

I have a column like this in 1 of my database tables...DateCreated, datetime, default(GetDate()), not null ...I am trying to use the Entity Framework to do an insert on this table like this...... PlaygroundEntities context = new PlaygroundEntities(...
entity-framework sql-server-2008
asked by Rod Johnson

In Microsoft Entity Model Framework, how to run a SQL Raw Query

I'm using Microsoft Entity model framework to access my database. I get an issue while i use this execute query command for executing Sql raw query. Let me know how could i resolve it. ...svdc.CreateQuery<VideoMasterTable>( "select * from videomastert...
c# entity-framework linq-to-entities search
asked by kamal

No Tables in VS 2010 Server Explorer Database

I'm working on a .Net application that needs to read from an Oracle 10g database behind Siebel. In VS 2010 Server Explorer, I've created a connection using the OracleClient type connector with a reference to the Oracle TNS service name as the "server nam...
entity-framework oracle server-explorer visual-studio
asked by Andy

How can I get around the problem "The name 'ConfigurationManager' does not exist in the current context"?

I am using VS2008. I have a project connect with a database and the connection string is read from App.config via ConfigurationManager. We are using L2E....Now I added a helper project, AndeDataViewer, to have a simple UI to display data from the database...
c# configurationmanager entity-framework linq
asked by 5YrsLaterDBA

Dynamic sorting using Linq-to-Entities

This is my query, how can I use string as orderby parameter?...string sortColumn="Title"; var items = (from ltem in ctxModel.Items where ltem.ItemID == vId orderby //something here select ltem).Skip(PageSize * P...
c# entity-framework linq
asked by verror

How to load data from tables with foreign keys in entity framework

I developed and entity framework (.edmx) application in 4.0 in that i got all the data of my querying table and its foreign key referenced tables data also. but when i change my project to 3.5 i am unable to get the data of foreign key referenced tables d...
asp.net dynamic-data entity-framework linq-to-entities
asked by Vinay Kumar Chella

In ASP.NET MVC 2, MvcBuildViews is true while using Entity Framework.

In VS 2010, changing ...<MvcBuildViews>true</MvcBuildViews>... in a MVC2 project's .csproj file causes an error if you are using Entity Framework....Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsof...
asp.net asp.net-mvc csproj entity-framework
asked by Alper Ozcetin

Linq has teamed up with COUNT.

I have 2 tables, Forums and Posts.... I want to retrieve all Forums fields with a new extra field: count all post that belong to this forum....I have this for now:...var v =(from forum in Forums join post in Posts on forum.ForumID equals post.Forum.Fo...
c# entity-framework linq
asked by shivesh

EntityDataSource Where IN entity sql clause implementation

I want to pass a number of values into a parameter of the ...EntityDataSource..., e.g.:...Where="it.ORDER_ID IN {@OrderIdList}"... (this is a property on the EntityDataSource)...<WhereParameters> <asp:ControlParameter Name="OrderIdList" Type="...
entitydatasource entity-framework entity-sql
asked by TonyS

From a stored procedure, IQueryable> (entity framework)

I want to get ...IQueryable<>... result when executing stored procedure. ...Here is piece of code that works fine: ...IQueryable<SomeEntitiy> someEntities; var globbalyFilteredSomeEntities = from se in m_Entities.SomeEntitiy where se.Glob...
.net entity-framework iqueryable linq-to-entities stored-procedures
asked by arena-ru

In Visual Studio 2010, how can I manually modify table mappings in ADO.NET?

I can't seem to find the answer to what I think is an easy question. I have a Entity model I just created and I want to set the name of the table and the columns by hand. I can see the "mapping details," but how do I edit them or add to them?
ado.net entity-framework visual-studio-2010
asked by Bialecki

In entity framework, how do I sort by column with null values last?

Does anyone know how to return an ordered list of strings with null values last? I have something like this:...using(var context = new DomainEntities()) { var result = context.Users.OrderBy(u => u.LastName).ThenBy(u => u.FirstName); } ...My problem t...
entity-framework
asked by devlife

SaveChanges using GUID as EntityKey in Entity Framework

I have a SQL Server 2008 database table that uses uniqueidentifier as a primary key. On inserts, the key is generated on the database side using the newid() function....This works fine with ADO.NET. But when I set up this table as an entity in an Entity F...
entity-framework guid
asked by MissingLinq

Page 20 of 347
  • ««
  • «
  • …
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • …
  • »
  • »»

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!