Is there a library or code sample for converting an in memory POCO c# object to a .cs code file that creates that object. An example:
object of type car in memory becomes:
Car c = new Car
{
Name = "mazda",
Id = 5,
Passengers = new List<string> { "Bob", "Sally" }
// etc... recursing to the bottom
};
I could assum...
There are a lot of posts about how cool POCO objects are and how Entity Framework 4 supports them.
I decided to try it out with domain driven development oriented architecture and finished with domain entities that has dependencies from services.
So far so good.
Imagine my Products are POCO objects.
When i query for objects like this:
...
I am currently writing a multi-threaded C++ server using Poco and am now at the point where I need to be keeping information on which users are connected, how many connections each of them have, and given it is a proxy server, where each of those connections are proxying through to.
For this purpose I have created a ServerStats class wh...
Let's say I have two tables in SQL that I want to have an EDMX model generated from (for now, going with automagical generation for everything) using POCO T4 templates. Let's say our two tables are Person (ID, FName, LName) and Comment (ID, PersonID, CommentText, CommentDate) with a one-to-many relation between the two (i.e. you can make...
I have a project using Entity Framework 4.0 with POCOs (data is stored in SQL DB, lazyloading is enabled) as follows:
public class ParentObject {
public int ID {get; set;}
public virtual List<ChildObject> children {get; set;}
}
public class ChildObject {
public int ID {get; set;}
public int ChildRoleID {get; set;}
p...
Hello all,
I have to develop a fairly large ASP.NET MVC project very quickly and I would like to get some opinions on my DAL design to make sure nothing will come back to bite me since the BL is likely to get pretty complex. A bit of background: I am working with an Oracle backend so the built-in LINQ to SQL is out; I also need to use p...
I have written a proxy server for Linux using Poco but have since been reading up on the various approaches to achieving TCP/IP server scalability. I will need the server to handle persistent connections (not HTTP traffic) with an upper limit of about 250 simultaneous connections. Each connection typically uses about 5-10Kb/sec and the b...
I was advised to use the POCO library for inter-process communication (IPC).
Looks like a powerful library and there is some documentation in the code, but I would prefer a working example , since I am not very familiar with the IPC stuff. I 've been searching for some time now and I'm out of luck.
If anyone has used POCO Shared Memor...
Scenario: Entity Framework 4 , POCO templates and Master Detail relation.
Lets say I have a master type like this:
//partial implementation of master entity
partial class Master
{
public void AddDetail(x,y,z)
{
var detail = new Detail()
{
X = x,
Y = y,
Z = z,
};
...
Basically I want to use a dynamic data website to maintain data in an EF4 model where the entities are in their own assembly. Model and context are in another assembly.
I tried this http://stackoverflow.com/questions/2282916/entity-framework-4-self-tracking-entities-asp-net-dynamic-data-error
but get an "ambiguous match" error from ref...
This isn't a very simple question, but hopefully someone has run across it.
I am trying to get the following things working together:
MVC2
FluentValidation
Entity Framework 4.0 (POCO)
Castle Windsor
I've pretty much gotten everything working. I have Castle Windsor implemented and working with the Controllers being served up by the ...
In this question I am looking for links/code to handle an IList<OrderLine> in an MVC 2 edit form. Specifically I am interested in sending a complete order to the client, then posting the edited order back to an object (to persist) using:
Html.EditorFor(m => m.orderlines[i]) (where orderlines is an enumerable object)
Editing an Order th...
Suppose I have an Entity Order with OrderDetails as child preperty.
I enable lazyloading like this:
_context.ContextOptions.LazyLoadingEnabled = true;
I Can feed a view with a method like this:
Order.GetAll()
And navigate by the order details automatically without getting the wirerd "Object reference not set to an instance of an ...
I'm attempting to implement a repository pattern with my poco objects auto generated from my edmx.
In my repository class, I have:
IObjectSet<E> _objectSet;
private IObjectSet<E> objectSet
{
get
{
if (_objectSet == null)
{
_objectSet = this._context.CreateObjectSet<E>();
}
return _obj...
OK, I want to make sure I cover my situation and everything I've tried thoroughly. I'm pretty sure what I need/want can be done, but I haven't quite found the perfect combination for success.
I'm utilizing Entity Framework 4 RTM and its POCO support. I'm looking to query for an entity (Config) that contains a many-to-many relationship...
Hi everybody
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 methods. Here are these two classes:
public abstract class EntityObject<T>{
...
HI all
I was trying to follow the POCO Template walkthrough . And now I am having problems using it in n-tiers design.
By following the article, I put my edmx model, and the template generated context.tt in my DAL project, and moved the generated model.tt entity classes to my Business Logic layer (BLL) project.
By doing this, I could...
One of the much-anticipated features of Entity Framework 4 is the ability to use POCO (Plain Old CLR Objects) in a Persistence Ignorant manner (i.e. they don't "know" that they are being persisted with Entity Framework vs. some other mechanism).
I'm trying to wrap my head around why it's necessary to perform association fixups and use F...
If I have a Domain Model that has an ID that maps to a SQL Server identity column, what does the POCO look like that contains that field?
Candidate 1: Allows anyone to set and get the ID. I don't think we want anyone setting the ID except the Repository, from the SQL table.
public class Thing {
public int ID {get;set;}
}
Candida...
Hello guys. I've got SOA which processing data for diff clients(asp,sl). The base of this design is domains of my business model. For transporting,showing it to clients I use DTO. For mapping domain to DTO I use AutoMapper. Now I should persist new entities from clients. I want use my DTO's at this scenario too. So i've got some questio...