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 can I use Entity Framework Code First CTP 5 to store images?

I'm just trying to figure out if there is a simple way to store and retrieve binary (file) data using EF Code First CTP 5? I would really like it to use the FILESTREAM type, but I'm really just looking for some way to make it work.
.net ef-code-first entity-framework sql-server-2008
asked by Max Schmeling

Client-side call to a WCF DataService [WebGet] function

I have an EF4 model with a stored procedure that I want to call from the client. The server code looks like this:...[WebGet] public IQueryable<SalesData> GetSalesReport(int reportType, int yr, int m, int d) { DateTime dt = new DateTime(yr, m, ...
entity-framework odata stored-procedures wcf
asked by Ronny

IDENTITY INSERT in Entity Framework

The 'Category' table in database defined like this: ...CategoryID - PK ,identity specification ON (only this column has identity) Description Title ...I want to insert new data:...Category cat = new Category { Description = "xxx", Title ...
c# entity-framework
asked by asker

Stored procedures vs. LINQ queries

What are the pros and cons of using linq queries(along with an ORM like EF or linq2sql) VS. Stored Procedures(SQL server 2008) to query and update a data model? Performance? Speed? Etc...
.net entity-framework linq linq-to-sql sql-server
asked by stephen776

How do I obtain the sql that the entity framework generates?

How can I get the sql script generated by an entity framework query? i.e. If I write ...entityDataDontext.table1.Where(r => r.primarykey == 1).First(); ...then how can I get the SQL which should be somewhat like this:...select * from table1 where primary...
entity-framework
asked by Gaurav Pandey

Remove all child objects

I am trying to update a resource as follows:... public void Update(Resource resource) { Resource _resource = _resourceRepository.First(r => r.Id == resource.Id); _resource.Content = resource.Content; _resource.Description = resource.Descriptio...
child-objects entity-framework
asked by Miguel Moura

In an MVC application, where should the Entity Framework Data Model be placed?

Lets consider default ASP.NET MVC application folder structure, so it's looks like this:...-App_data -Content -Controllers HomeController.cs -Models AccountModels.cs -Scripts -Views ...My question is: Where is the best place to put Entity Framewor...
asp.net-mvc asp.net-mvc-2 design-patterns entity-framework
asked by Dariusz

Entity Framework 4 is used to populate a DropDownList.

I need a very simple example of code to populate a DropDownList using Entity Framework 4....At the moment I use this code:... using (TestHierarchyEntities context = new TestHierarchyEntities()) { uxSelectNodeDestinationDisplayer...
asp.net c# entity-framework
asked by GibboK

How to filter on child entities in Linq To Entities

I have entities ...Group... and ...User....... the ...Group... entity has ...Users... property which is a list of Users.... User has a property named ...IsEnabled.......I want to write a linq query that returns a list of ...Group...s, which only consists ...
entity-framework linq linq-to-entities wcf-ria-services
asked by Yeonho

LINQ Optimization Entity Framework's Any() method

After profiling my Entity Framework 4.0 based database layer I have found the major performance sinner to be a simple LINQ Any() I use to check if an entity is already existing in the database. The Any() check performs orders of magnitude slower than savi...
entity-framework linq performance
asked by Holstebroe

Updates to Entity Framework are not functioning.

I'm trying to update a POCO object using entity framework in the following way:... context.Jobs.Attach(job); context.SaveChanges(); ...That does not work. No error is thrown, it just isn't updating the values in the database....I tried:...context.Jobs.At...
entity-framework poco
asked by Shawn Mclean

When serializing my entities using Json.Net, I get unexpected characters ("").

I am using the excellent Json.Net library to serialize my entities generated by entity framework. I use the following code to do so :...using (MyVoucherEntities context = new MyVoucherEntities()) { List<MyObject> list = context.MyObjects.ToList(); str...
c# entity-framework json.net wcf
asked by Renaud

framework for entities The provided metadata resource could not be loaded.

Possible Duplicate:...MetadataException: Unable to load the specified metadata resource...I hope someone can help with this. i have tried following other posts on here and dozens on other sites but i can get this working....the entity framework was all wo...
.net entity-framework
asked by WraithNath

ProviderManifestToken configuration for EF Code First

I have a asp.net MVC3 project using EF code-first. For my unit testing I have been using SQL Server CE 4.0 and SQL Server 2008 Express. Both have worked perfectly with EF generating my database as expected....However, when I run my application outside of ...
code-first connection-string entity-framework
asked by trevorc

How did I resolve the circular reference problem in Json serialization?

There is post ...here... that asks how to solve the circular reference error when returning a serialized object via EF4 CTP5. I ran into this same problem with a WCF web forms project a while back....I was able to "solve" this problem in my WCF/web forms...
entity-framework json serialization
asked by trevorc

In EF Code First, how do I singularize my tables?

I prefer using singular nouns when naming my database tables. In EF code first however, the generated tables always are plural. My DbSets are pluralized which I believe is where EF is generating the names but I don't want to singularize these names as I...
ef-code-first entity-framework
asked by trevorc

Multiple edmx files vs a single huge edmx file?

I'm new to the Entity model thing and i'm looking for an advise how to organize my Entity model....should i create one entity model file (.edmx) which will contain all the tables in my database or should i break it logical files for user, orders, products...
ado.net-entity-data-model entity-framework
asked by Or A

First, foreign keys/objects should not be saved in Entity Framework code.

I have three classes, like so:...[DataContract] public class ApplicationDto : BusinessBase<int> { /// <summary> /// Gets or sets the name. /// </summary> /// <value>The name.</value> [DataMember] public string Name { get; set; } ...
c# code-first entity-framework
asked by MartinHN

To code-first DbContext, provide the connection string.

How do I pass a connection string to entity framework's code-first DbContext? My database generation works correctly when both DbContext and the connection string in web.config is in the same project and named the same way. But now I need to move the DbCo...
c# database-connection entity-framework
asked by Shawn Mclean

In EF Code First, what is the syntax for self-referencing foreign keys?

I am trying to reference a foreign key from SpouseId to Id in the Contact table. What is the syntax for doing this? I can't seem to find an example. Thanks....I have a class like this:...public class Contact { public int Id {get;set;} public st...
ef-code-first entity-framework
asked by trevorc

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

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!