Hi
I have these 2 entties in my edm:
Parnter members: int id, string firstname, string lastname, Partner_Address partneradress
Partner_Address members: int id, int partnerid, date validfrom
If i use create my query like this: ObjectQuery.include("Partner_Address") i get a Partner entity and could access Partner_Adress properties (eg...
Hello all.
I’m having fun with EF and have come unstuck.
Originally I used the following bit of code using standard linq that essentially enters some data into a table.
ManagePreferencesDataContext manpref = new ManagePreferencesDataContext();
tblManagePreference prefMemberID = new tblManagePreference();
...
I'm working with an existing database, utilizing the Entity Framework for dynamic query builder. This is a key factor here. I don't know what types of objects I'll be working with until runtime, as the user is allowed to select which objects/properties they want with the query builder... So I'm using ObjectQuery<EntityObject>.
Everythin...
I have a stored procedure which uses a FOR XML statement at the end of it, and returns me some XML.
I am using .NET 4 and the Entity Framework and when I do a function import of this stored procedure and try to call it through the Entity Framework it truncates the return at 2033 characters.
I swapped the Entity Framework for a traditi...
Can WCF RIA Services be used without the Entity Framework (for example, if the datasource is no classical database)
...
What are the differences between these 3 types of loading? Can someone explain with an example? Different resources online use different definitions causing more confusion than necessary.
...
hi all,
i want to learn entity framework. i started with some EF tutorials and i also know little about linq to sql.
i want to learn through a pet project. project should be in three layers. web forms (prez), data layer(c# lib), bussiness layer(c# lib). Project can be any, any functionality. just want to learn how to use EF in diff. la...
Following on from the excellent answer to my previous question:
http://stackoverflow.com/questions/3220155/linq-entity-framework-generic-filter-method
I am now trying to understand how I can apply something like recursion to my solution.
To recap, instead of multiple similar declarations of this method:
protected IQueryable<Database....
Suppose I have passed in a viewmodel with a PERSON record with multiple addresses
I'm looking to write a view something like this (simplified)
<% foreach (var addr in Model.PERSON.ADDRESSES) { %>
<li>
<%: Html.TextBoxFor(m => addr.Add1)%>
</li>
<% } %>
Which appears to display as expected, however, each generated Text...
Hi, I have a EF4 model where I have Product entity that have one-to-many relation with Task entity (ChildTasks). I have to get some Projects from db based on some user criteria. The Project has one custom property (not associated with any column) named EstimatedProgress where I have to store additional information about Project - compute...
I'm trying to update a record using the Entity model (3.5) when I get this error. I have no such parameter named "record".
In walking through the code, a single entity is found, The four Entity keys are filled correctly("EntitySet=WOTimeRecording;WorkOrderNbr=69229;UserQID=Qlab64;WeekIdentifier=2010-Week14;TimeIdentifier=5") , and the ...
Hi,
I'm trying to understand some fundamental best practices using Entity Framework.
My EDM design has Group and User entities which the Group may contain users and other groups.
The question is:
What is the best way to retrieve the users from a group?
For getting the groups its easy, just creating the context object and creating a ...
Hello everybody
I am trying to filter derived classes in my entities but i am getting exception.
var filtered = db.PersonSet.OfType<Person>().
Where(person =>person.GetType()==typeof(Person))
I am getting below exception if i try to loop filtered collection by foreach.
"LINQ to Entities does not recognize the method '...
I have an EF 4.0 model that has a parent child relationship (say order and orderdetails)
order
{
[primative]
orderid,
ordername,
ordershipping
[navigation]
orderdetails
}
orderdetail
{
orderdetailid,
orderpartid,
orderquantity,
orderpartname
}
My question is how do i load orders with orderdetails where the ...
Hi,
I'm sure most people who use the entity framework sometimes need an entity only for some business operations without it actually ever getting persisted to the database. For example, an online shop checkout wizard where you want to fill the customer and address info, but only persist it once the customer is at the end of the wizard a...
Hi,
I have a Silverlight 3 app using WCF RIA Services and Entity Framework for the data-layer.
I need to pivot some data and was wondering what the best practice is: Should the service return pivoted data, or should it just return a standard entity set and the client do the pivoting? Bearing in mind that the data needs to be editable s...
I use entity framework with Visual Studio 2008, sure it was SP1 both .NET Framework and VS itself. My application is develop in n-tier environment. First step I convert data from context to collection and serialize to user.
HRMSDBContext context = new HRMSDBContext();
List<InHouseTrainingHead> heads = context.InHouseTrainingHead.ToList...
Hi!
I have created a silverlight application, using the silverlight business application template.
I added a ADO.NET entity data model, and created it from scratch in the designer. I then generated a database from the model. The model has a "project" entity and a "client" entity with a many-to-many relationship.
Then, I added a doma...
We are using ado.net entity framework 4.0 for our database layer and I am a newbie to ado.net entity framework. I have created entity via adding a entity in entity framework. I want to map that entity with stored procedure only not table of the database. Stored procedure will return same column as entity. How it is possible and how i can...
I've got an EDM with two tables Product and ProductCategory with a many-to-many relationship between both.
What I'm currently trying to do is to build a dynamic query to select the products related to the categories the user has selected through the UI.
In short I should build a query like the following but based one or more categories...