Questions tagged [entityset]
54 questions
0
votes
1 answer
MVC Entity Framework state behavior with multiple instances of an entityset
I'm trying to understand the relationship between entityset instances of an EF Entities model (the model was created by Entity Designer). Basically I end up with 1 logical transaction having 2 instances of an entity's Repository class. Data…

dale
- 391
- 1
- 3
- 7
0
votes
1 answer
Linq to SQL EntitySet Binding the MVVM way
In a WPF application i'm using LINQ to SQL classes (created by SQL Metal, thus implementing POCOs).
Let's assume i have a table User and a Table Pictures. These pictures are actually created from one picture, the difference between them may be the…

Savvas Sopiadis
- 8,213
- 10
- 34
- 53
0
votes
2 answers
MVC 1.0 + EF: Does db.EntitySet.where(something) still return all rows in table?
In a repository, I do this:
public AgenciesDonor FindPrimary(Guid donorId) {
return db.AgenciesDonorSet.Include("DonorPanels").Include("PriceAdjustments").Include("Donors").First(x => x.Donors.DonorId == donorId && x.IsPrimary);
}
then down in…

Dale
- 11
- 4
0
votes
1 answer
Find size of EntitySet?
I have an entity set that looks like this when I print it to the console:
EntitySet {entityContext: resource_dbEntities, _expression: undefined, elementType: function, person: function, createNew:function…}
_defaultType: function…

AllieCat
- 3,890
- 10
- 31
- 45
0
votes
0 answers
EntitySet schema value dbo instead of database.dbo
Running EFProfiler found that the query running behind the scenes was
SELECT [Extent1].[Total] AS [Total]
FROM [dbo].[Invoice] AS [Extent1]
The problem is that the DB name is incorrect. It should be:
SELECT [Extent1].[Total] AS [Total]
FROM …

user1322437
- 11
- 3
0
votes
1 answer
EntitySet Querying
I'm trying to run a query similar to
var results = MyItem.MyEntitySet.Where( x => x.PropertyB == 0 )
MyEntitySet has one association, PropertyA, with MyItem.
Ideally, the underlying SQL query should be
SELECT .. FROM .. WHERE ([t0].[PropertyA] =…

codechobo
- 829
- 1
- 7
- 12
0
votes
1 answer
Datagridview with sorted EntitySet? (.NET 3.5)
I'm hoping there's a simple answer to this one I've missed in hours of Googling...
I have a DataGridView which needs to display and add/delete/edit records from a database. I'm using the Entity Framework, so records are initially…

Matthew Bernstein
- 23
- 5
0
votes
2 answers
What does P mean in C# Expression?
I am attempting to use the answer in post: How do you sort an EntitySet to expose an interface so that I can sort an EntitySet with a Binding list. I have created the class below and I get the following compiler error: "The type or namespace 'P'…

Grasshopper
- 4,717
- 9
- 36
- 62
0
votes
2 answers
How to add to linq2sql entity set for master detail if I can't explicitly define the detail?
Maybe I'm going about this the wrong way...
I have an Order table and an OrderItem table. I create a new Order using linq2sql generated classes.
I then attempt to get all orderable items out of my database using a query that goes after various…

IronicMuffin
- 4,182
- 12
- 47
- 90