navigation-properties Questions

3

Solved

Assume I have these simplified EF generated entities... public class PurchaseOrder { public int POID {get;set;} public int OrderID {get;set;} public int VendorID {get;set;} public IEnumerable&...
Pauperize asked 30/11, 2011 at 22:32

1

Solved

I am using Entity Framework 4.3.1 using the DbContext POCO approach against a SQL Server 2012 database. I have just two tables in the database and they look like this: NOTE: There are no forei...

1

Solved

I am trying gain more understanding of Linq queries and Entity Framework (4.1). Please take a look at following two queries. Both queries returns car type name (CarType.Name) In first query I used...

1

Solved

Context: Code First, Entity Framework 4.3.1; User ---- Topic, 1 to Many relation; User with public virtual ICollection<Topic> CreatedTopics Navigation Property(Lazy Loading); Topic with pub...

1

Solved

I'm trying to setup a simple inheritance scenario with EF 4.3.1 using code first approch and fluent configuration. I've created an abstract base type 'A' with a one-to-one navigation property and ...

1

Solved

In ASP .NET MVC 3 with Entity Framework, I have a domain object which has a navigation property referencing another objects, as follows: public class Person { public String Name {get;set;} publ...

2

Solved

I have a method on my generated partial class like this: var pChildren = this.Children .Skip(skipRelated) .Take(takeRelated) .ToList(); When I look at my SQL Server, I can see the generated c...

1

Solved

I a portion of my EF model that looks like this: Summary: Location has many Posts Post is an abstract class Discussion derives from Post Discussions have many Comments Now, the query i'm try...

1

Solved

I am having some trouble with refreshing the related collection of entities. Essentially the problem is as follows: public class Student { public virtual ICollection<Lecture> Lectures { ge...
Flatiron asked 1/10, 2010 at 12:36

1

Solved

instead of talking let me talk with code: Dim Contact = Context.Contacts.Include("Phones") Dim phone = Contact.Phones(0) Contact.Remove(phone) How do I refresh the context now, canceling last re...

© 2022 - 2024 — McMap. All rights reserved.