This white paper describes and demonstrates how to write testable code with the ADO.NET Entity Framework 4.0 and Visual Studio 2010. This paper does not try to focus on a specific testing methodology, like test-driven design (TDD) or behavior-driven design (BDD). Instead this paper will focus on how to write code that uses the ADO.NET Entity…
I've been reading up on Entity Framework, in particular, EF 4.1 and following this link ( http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx) and it's guide on Code First.
I find it neat but I was wondering, is Code First supposed to be just a solution for rapid development where you can…
I did a presentation at DDD8 on the entity framework and how to stop your DBA
from having a heart attack. You can find my demos and slide deck here http://sqlblogcasts.com/blogs/simons/archive/2010/01/30/Entity-Framework-how-to-stop-your-DBA-having-a-heart-attack.aspx
Whilst at DDD Mike Ormond
interviewed me about my view on ORMs and…
I recently reviewed two books - Programming Microsoft ASP.NET MVC, 2nd Edition and Programming Entity Framework - Code First. Here are the links to the complete reviews:Programming Microsoft ASP.NET MVC, 2nd Edition http://www.bipinjoshi.net/articles/43fcbd2d-2d44-4df7-9cf1-492eb63bc31a.aspx Programming Entity Framework -…
How do I output/log the sql being executed behind the scenes by the Entity Framework in an asp .net mvc application? In my case I'm using a Sql Server 2005 database.
I found this question Linq to Sql logging, but I'm trying to figure out how to do this with the entity framework v1 and asp .net mvc 1.0. Any one have any ideas on…
Hello Everyone
I'm playing around with Entity Framework 4 and code only. The tutorial I'm following is using the Beta-Version of Visual Studio 2010 and is referring to Microsoft.Data.Entity.Ctp.
Since I'm working with the final release of Visual Studio the name of the dll must have changed.
Can somebody tell me how its name is…
I have yet to use Entity Framework or .NET 4 so there will be a learning curve, but assuming good quality C# developers (who are yet to use Entity Framework and .NET 4.0), what would your ball park estimate be for say 50 pages containing text box, dropdowns and grids.
Would it be around 1-2 days per page?
Is it possible to use separete ssdl, csdl and msl files for each Entity in EntityFramework?
That is, I want to modularize the mapping information.
Note: EdmGen.exe tool stores the ssdl, csdl and msl information in respective files for all entities.
Note: If anyone used NHibernate, he should be aware of the fact that,…
I am using the ADO.Net Entity Model. Everytime I create a record, I am calling _entity.AddToTable(object); _entity.SaveChanges();
What is the fastest way of inserting the data? Is there any "batch" or "SqlBulkCopy" option for entity model?
I don't need any data to be stored. I'd like an application to start, create an Entity Framework entities container based on the model I've designed but having no data records in it, then generate some data (from user input and other input sources), work with it and discard all the data on close, without propagating any…
Hi,
I'd like to know if it's possible to have both Linq-to-SQL and Entity Framework running side-by-side. Our current configuration is Linq-to-SQL and we'd like to eventually move to EF. But there's just too much going on in the Linq-to-SQL side right now and we'd like to do it in phases.
so any chance we can just…
In almost every talk I have done on Entity Framework I get questions on how to do custom SSDL or SQL when using model first development. Quite a few of these questions have required custom changes to the SSDL, which of course can be a problem if it is getting auto generated. Luckily, there is a tool that…
Last week the data team shipped the Release Candidate of Entity Framework 4.1. You can learn more about it and download it here. EF 4.1 includes the new “EF Code First” option that I’ve blogged about several times in the past. EF Code First provides a really elegant and clean way to work with data, and…
So I've started to add Entity Framework 4 into a legacy web application (ASP.NET WebForms).
As a start I have auto-generated some entities from the database. Also I want to apply Repository Pattern.
There is an entity called Visitor and its repository VisitorRepository
In VisitorRepository I have the following…
Hi,
I have a generic repository that uses the entity framework to manipulate the database.
The original code is credited to Morshed Anwar's post on CodeProject. I've taken his code and modified is slightly to fit my needs.
Unfortunately I'm unable to call an Imported Function because the function is only…
I have a question, much liket this unanswered one. I'm trying to work with the entity framework, and having a tough time getting my foreign tables to update. I have something basically like this in the DB:
Incident (table):
-ID
-other fields
Responses (table):
-FK:Incident.ID
-other fields
And and…
Stepping away more and more from writing SQL for my applications, I decided to give the Entity Framework a try. However, I've run into something I believe is causing me to write more code than I think is strictly necessary.
When I accessed some navigational properties, I discovered that all…
I'm trying to make sense of a situation I have using entity framework on .net 3.5 sp1 + MySQL 6.1.2.0 as the provider. It involves the following code:
Response.Write("Products: " + plist.Count() + "<br />");
var total = 0;
foreach (var p in plist)
{
//... some actions
total++;…
I have 2 entities are entities meeting and meetingAgenda.
I write code entity class (EJB) from database like this.
public class Meeting implements Serializable {
......
@XmlTransient
public Collection<MeetingAgenda> getMeetingAgendaCollection() {
return…
There are many instances we might have to use transactions to maintain data consistency. With Entity Framework, it is a little different conceptually. Case 1 – Transaction b/w multiple SaveChanges(): here if you just use a transaction scope, then Entity Framework (EF)…