I've been taking a look at EF4 POCO templates in beta 2.
The FixupCollection looks fine for maintaining the model correctness after updating the relationship collection property (i.e. product.Orders it would set the order.Product reference ).
But what about support for handling the scenario when some of those Order objects are remove...
I have a bidirectional relationship in NHibernate:
<class name="Child" table="Children">
<many-to-one name="Parent" column="ParentId" not-null="true" />
</class>
<class name="Parent">
<set name="Children" lazy="true" table="Children" cascade="all">
<key column="ParentId" not-null="true" />
<one-to-many class="Child" />
</...
I am using Entity Framework v4. I have created a POCO class that contains a bunch of scalar properties and a collection that returns an Interface type. How do I create this relationship in the EF model? How do I show a collection that contains different items but they all have a common interface? Here would be an example of what I a...
I'm trying to figure out how to use POCO for silverlight use. I found an article that appears it will step me through the basics. However, it has in it a reference to the System.Windows.Ria.Controls. i don't have that on my machine.. i found System.Windows.Ria but not one that has teh control on it. I just downloaded teh RIA beta to...
Hello,
We are receiving an XML file from our client. I want to load the data from this file into a class, but am unsure about which way to go about it.
I have an XSD to defining what is expected in the XML file, so therefore i can easily validate the XML file.
Can i use the XSD file to load the data into a POCO, using some sort of ser...
Inspired by this post, I'm wondering if anyone has found a good comparison between the POCO Generator and the 1.0esque Entities/Context. Why should I use one over the other? Or, what criteria should I be evaluating on my project to make my decision?
I once thought that POCO's were less work for mvc/wcf/databinding. But it seems a mor...
Lets say I've a Team class which contains 0 or more Players.
The Player class is easy:
public class Player
{
public long Id { get; set; }
public string Name { get; set; }
public Team Team { get; set; }
}
But whats the best to define the Team class?
Option 1
public class Team
{
public long Id { get; set; }
public...
I started messing with EF 4.0 because I am curious about the POCO possibilities... I wanted to simulate disconnected web environment and wrote the following code to simulate this:
Save a test object in the database.
Retrieve the test object
Dispose of the DataContext associated with the test object I used to retrieve it
Update the test...
Based on this question I am going to use Poco::NamedEvent, but I need to wait for multiple events (like win32 WaitForMultipleObjects()
Is there such a thing in poco? (searching the docs doesn't yield much but perhaps I am not using the right searches)
...
Given a set custom configuration classes based off ConfigurationElement I want to convert the custom class into a POCO object graph. Could reflection and LINQ extension methods/ anonymous types give me an object which removes the ConfigurationElement inheritance?
...
Hello,
I'm trying to try the POCO library. I downloaded the zip file, and opened the vs solution file named "Net_vs90.sln" on VS 2008. When I try to build the solution, I get this ugly error:
bla bla bla....
1>Linking...
1>LINK : fatal error LNK1104: cannot
open file 'PocoFoundationd.lib'
bla bla bla....
Linkin...
What is the benefit of using POCO? I don't understand the meaning of Persistence Ignorance, what does this mean? That the poco object can't expose things like Save? I can't wrap my head around this POCO that there's alot of buzz around.
What is the difference with the EF generated entities and POCO?
...
So I'm starting to look into EF and POCO.
From my understanding, the entity generated by EF is not pure POCO since it inherit from EntityObject.
But are they PI? It seem to me that they don't have any persistence awareness in them, or there is something in the EntityObject that makes them PI?
...
I am currently trying to fix a bug in a proxy server I have written relating to the socket select() call. I am using the Poco C++ libraries (using SocketReactor) and the issue is actually in the Poco code which may be a bug but I have yet to receive any confirmation of this from them.
What is happening is whenever a connection abruptly ...
Hi,
One strange thing i've got to see in Entity Framework 4.0 V2 Auto Generated Classes(tt) is that the classes are not marked as Serializable. Although they are having DataContract attribute for WCF.
Now the problem is, when I store the POCO object into viewstate it throws me an exception saying that the class is not serializable.
If...
I have searched like a fool but does not get much smarter for it..
In my project I use Entity Framework 4 and own PoCo classes and I want to use DataAnnotations for validation. No problem there, is how much any time on the Internet about how I do it. However, I feel that it´s best to have my validation in ViewModels instead and not let ...
I am working on a project and I am using Entity Framework 4 as my ORM. I am implementing POCO classes. Every example I see with EF 4 and POCOs implements all properties with public setters. Is that the only way I can use POCO classes with EF 4? Do all my setters need to be public?
...
Hi All,
I am developing an ASP.NET MVC app and I've been looking into using Data Annotations on my POCO's which are defined in my Service Layer. As long as I have a reference to System.ComponentModel & System.ComponentModel.DataAnnotations this is no problem and what I like about this is that it allows me to reuse my Service Layer in a ...
Could someone please explain what an I/O Error 32 refers to in the context of a network socket?
I have a multithreaded Socks5 server written using Poco SocketReactors and am getting this error when the server load reaches a certain point. The exception is thrown within my onReadable handlers at the same time across all threads which hav...
The repository pattern typically has Get*() and Save() (or equivalent) methods for each object. How does this fit into the object graph in EF? Consider the following with lazy-loading POCO objects:
// EF
var orderItems = context.OrderItems.Where(oi => oi.Order.Id == 123);
// Repository
IOrderItemsRepository orderItemsRepository = new...