Okay, I'll be straight with you guys: I'm not sure exactly how Domain Driven my Design is, but I did start by building Model objects and ignoring the persistence layer altogether. Now I'm having difficulty deciding the best way to build my tables in SQL Server to match the models.
I'm building a web application in ASP.NET MVC, although ...
I'm trying to add an ADO.NET data service to a vanilla ASP.NET-MVC project. Does anyone know if these technologies are compatible?
When I Ctrl+f5 the solution and visit the service URL all I get when is the very unhelpful "Request Error ... See server logs" page. Does the Development Web server even write any logs and if so where?
I ...
I recently installed VS08 SP1 so that I could use the Entity Framework. However, upon loading projects with edmx files, I get a "Package Load Failure" error that points at "Microsoft.Data.Entity.Design.Package".
Unfortunately, googling this turn up only problems dealing with installing SP1 over the Entity Framework CTP, which I have nev...
Hi I am devloping the a asp.net site which will have lots of user online at a time. I am writing very efficient stored procedure for it. Which ORM tool should I use?
Ado.net entity framework or linq2sql?
Performance is needed as our requirement is to load every page in 4 seconds.
...
Hi,
I am new to the entity framework and wondered, when the data is actually taken from the database. If I e.g. does:
from order in orderQuery where order select car;
is the data then selected from the database, or is it first when I manipulate it like the code below?
(from order in orderQuery where order select car).ToList();
...
Following the way Rob does it, I have the classes that are generated by the Linq to SQL wizard, and then a copy of those classes that are POCOs. In my repositories I return these POCOs rather than the Linq to SQL models:
return from c in DataContext.Customer
where c.ID == id
select new MyPocoModels.Customer { ID = c.ID, ...
How should I handle a custom property in a situation where I use partial classes with the EF-generated classes?
Here's the setup:
TimeSheet Table - this stores an employee's hours
- TimeSheetID (auto, int, PK)
- EntryDate (DateTime)
- Hours (int)
- EmployeeID (int)
EmployeeHourlyRate table - this stores an employee's current hourly r...
I'm learning ASP.NET MVC (and MVC in general) and all the help online I find only demonstrates using a single table, not relations between multiple tables. I'm running a query that I expect should also return associated entities, but it's not and can't figure out what I'm missing. I appreciate your help!
I have the following data:
Ti...
Hi,
How can i insert new record in EntityDataSource (from gridview)
Thanks a lot.
...
Consider for instance my following database model.
UserTable(Id, Username)
TextContentTable(Id, Name, Description, CreatedByUserId, ModifiedByUserId, TextContent)
ImageContentTable(Id, Name, Description, CreatedByUserId, ModifiedByUserId, ImageContent)
I would like to create the following object model. But is it even possible?
For ...
EDIT: Duplicate of Should Entity Framework Context be Put into Using Statement?
I've been tossing around this idea for some time wondering what bad could happen by not properly disposing my object context and allowing it to die with the GC. Normally, I would shun this, but there is a valid reason to do it.
We are using partial clas...
I'd like to hear from people who are using EF in production, or made a valid attempt to do so.
I saw the When NOT to use the Entity Framework question on this site. I also read Vote of No Confidence. If you played with Entity Framework and decided not to use this, I don't want to hear from you.
I understand that EF is not mature as N...
Hi,
I'm trying to write a WCF method that will receive a detached EntityObject from the client and will be able to tell which properties and which relationships were changed for this entity comparing it with what's already in the context.
Of course that if this entity is a new entity or one of its relationships were added/deleted/modifie...
Hi
I have entities
user:
id
name
navigation :group
group:
id
name
navigation :user
relation:
usrgrp
iduser
idgroup
Here I wan't to add data to relation and not the main entities. Please give me example
how to delete and insert into usrgrp.
Thanks in advance.
s.
...
Hi,
I am using a layered architecture with the Entity Framework as my datalayer with a bunch of repositories on top which contain the Linq-To-Entities queries.
The data layer is one project, next to that I have a Services layer and the interface, which is a website.
I want my website to be responsible of specifying the connectionstring...
If I use entity framework with linq to sql to query it and I have an object Person but I only need two properties of that object, what's in memory will be load, the entire object ?
Example :
I got the entity Person with properties : Name, Age, Address, Country, Language ...
I only need to use the property Name and Age. So I got no ne...
A bit of a clarification: I was browsing Julia Lerman's Oreilly title on Entity framework and I got mighty confused.
I have Charlie Calvert's essential LINQ, but from my 10 minute session with Lerman's book, it transpires that LINQ is LINQ to SQL which seems underpowered with its DataContext object etc...
Whereas Entity Framework is th...
Is there any way to bulk-delete a bunch of objects matching a given query in LINQ or LINQ-to-Entities? The only references that I can find are outdated, and it seems silly to iterate over and manually delete all objects I wish to remove.
...
I'm just starting out with the Entity Framework and ADO.NET Data Services and I've run into an issue that I can't seem to figure out. I have two tables, one that has user information and the other that has a created by field. Within the database, there isn't a foreign key between these tables. The user table contains an arbitrary Id, ...
I'm trying to "Entitify" some external table (which I don't administer) in order to use it within a MVC application and in principle I'm not being terribly successful with the attempt (VS2008 output):
Error List [0 Errors] [0 Warnings] [1 Message]
Description
The table/view 'DATABASE.dbo.table' does not have a primary key defined and ...