Questions tagged [entityobject]

22 questions
129
votes
9 answers

Value vs Entity objects (Domain Driven Design)

I have just started reading DDD. I am unable to completely grasp the concept of Entity vs Value objects.. Can someone please explain the problems (maintainability, performance.. etc) a system could face when a Value object is designed as a Entity…
StackUnderflow
11
votes
2 answers

DDD - Value Objects Vs. Entity Objects

I'm new to DDD and trying hard to understand some of the concepts. How do you determine in your domain what objects are Entity objects and which ones are Value objects, and how exactly are they treated differently?
Micah
  • 111,873
  • 86
  • 233
  • 325
5
votes
3 answers

What's the fastest way to get an ObjectContext reference from an entity object?

I'm creating extensions for my EntityFramework objects as described in How to: Customize Generated Data Objects but in some of those extensions I need to get the instance's ObjectContext to look up some other values in the model. I've found Tip 24 –…
John Kaster
  • 2,509
  • 1
  • 33
  • 40
5
votes
1 answer

Loading partial entities with Linq to Entities

I am trying to load a partial entity with Linq to Entities: Dim contacts = From c In My.Context.Contacts _ Select New Contact With { _ .ContactId = c.ContactId, _ .Name = c.Name } I tried it and I get the following…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
2
votes
1 answer

Linq to sql Inserting Attached Entity Objects

I'm learning Linq to sql and I came across "Inserting Attached Entity Objects" I have tested example from the book and it works fine but could someone explain me how to edit it to make it work for my example I have two tables (I'll ignore userID in…
Eric
  • 21
  • 2
2
votes
3 answers

EF EntityObject not updating databindings of relationships

I'm using EntityFramework, WPF and MVVM in my application and got some problems with updating the databinding of relationships between EntityObjects. I was able to downsize my problem to only a few lines of XAML and I hope someone can help me as I'm…
Gilles Radrizzi
  • 999
  • 3
  • 10
  • 20
2
votes
2 answers

Convert.ChangeType() on EntityObject

I'm working on MySQL using .Net Connector 6.3.6 and created Entity models on VS 2010. I'm planning to write a generic method that would add an EntityObject to its corresponding table. Here is how it looks: public void AddToTable(ObjectContext…
Alerter
  • 249
  • 4
  • 13
2
votes
1 answer

Entity framework/WCF -- Safe/smart to send entityObjects to Silverlight client?

I'm a little confused here. I have my POCO classes created with the entity framework modeled from the datbase. Obviously, I'd like to use these classes in the client too (and any bookkeeping on them would be nice if I'd like to send them back and…
Brian Rosamilia
  • 1,448
  • 14
  • 24
2
votes
1 answer

Entity Framework 4.0 and DDD patterns

I use EntityFramework as ORM and I have simple POCO Domain Model with two base classes that represent Value Object and Entity Object Patterns (Evans). These two patterns is all about equality of two objects, so I overrode Equals and GetHashCode…
1
vote
1 answer

Switch to using POCOs instead of EntityObjects

I would like to start by saying that im new to EF, and the following text is just based on my assumptions. So feel free to correct me on where im wrong: I have an entity generated by EF called Foo. I suppose this is an EntityObject. So if i create…
Johan
  • 35,120
  • 54
  • 178
  • 293
1
vote
2 answers

EF4 save complex detached object graph

I've got the following EntityObject-based EF model (properties written here as fields for keeping code cleaner): Booking { int BookingID; EntityCollection BookingCustomers; string Notes; } BookingCustomer { Customer…
Muxa
  • 5,563
  • 6
  • 46
  • 56
1
vote
0 answers

Get Entity Object from string using reflection

I am able to obtain an object set with this code: string tableName = "States"; var test = db.GetType().GetProperty(tableName).GetValue(db, null); //this returns {System.Data.Objects.ObjectSet} However, I would like to first find…
sǝɯɐſ
  • 2,470
  • 4
  • 33
  • 47
0
votes
2 answers

Conditional Association with Entity Framework

I want to create conditional association with Entity Framework. As far as I know we can't create conditional foreign keys, so I can't solve this issue at database server level. I have tables like that: ---Property--- int id string Name int …
0
votes
1 answer

How to send an object of custom class from Android to Java Server?

I have created several classes in android client application corresponding to each database table (just like concept of Entity-Objects). i want to retrieve data from database of the server to android client application and then assign that returned…
W.S
  • 931
  • 1
  • 10
  • 36
0
votes
1 answer

Created a BasePOCO (which basically is similar to Entity Frameworks Database First EntityObject class)

At work, there is an application was developed using Entity Framework Database First approach. Therefore, our business entity classes are derived from Entity Framework Database First's EntityObject class. Our team was to modify the application by…
1
2