poco

Subsonic table mappings

I've searched a lot and I haven't really found an answer. Is it possible to use POCOs with Subsonic? How do I map tables (which do not look like the POCOs) to my classes? ...

How to use an Argument in NewExpression as Expression to be used in OrderBy method?

First, I use C# 4.0 and EF 4.0 with POCO object to access database. Next, I create some grid (like jqGrid) for displaying data from database via ASP.NET MVC 2.0. This grid can order data by clicking at the column header. Source code could look like this. // This method will generate data for jqGrid request. // jqGridRequest contain seve...

Where is EntityConfiguration and ContextBuilder in Visual Studio 2010?

I see examples about code-only POCO for en entity framework 4, but I cannot find the classes EntityConfiguration and ContextBuilder and I cannot see which reference I need to add to have them. Is it part of the .Net Framework 4 or do we have to download something else? ...

EF4 POCO: Snapshot vs Self-tracking over WCF

Hello Last year I developed a data access service for our project using Entity Framework (.NET3.5 of course) and using Julie Lerhman's book as a guide developed state tracking POCO objects. We use WCF and also have Silverlight 3 clients. We are moving to .NET 4.0 and I want to switch to using code generation to eliminate wasted develope...

Lucene.NET through NHibernate.Search and POCO Entities

Is there anyway to keep true POCO Entities while working with Lucene.NET through NHibernate.Search ? It seems that Lucene.NET (NHibernate.Search) mapping only work with Attributes within Entity classes. ...

Using Entity Framework 4.0 with Code-First and POCO: How to Get Parent Object with All its Children?

I'm new to EF 4.0, so maybe this is an easy question. I've got VS2010 RC and the latest EF CTP. I'm trying to implement the "Foreign Keys" code-first example on the EF Team's Design Blog, http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx. public class Customer { public int Id { get; set; publi...

Entity Framework 4.0: Create an unmapped property in the model (currenty i get : error 11009 - Property is not mapped)?

Hi there, I know that i can enter/add new properties via code manually into partial classes but i wanted to use the model to add my new properties - reason being is that i can control a number of different attributes like NULL and things like that... and of course the code generations works great.. I added some foreign keys manually ju...

Validating disconnected POCOs

In my ASP.NET application I have separate projects for the Data, Business and UI layers. My business layer is composed of plain objects with declarative validation, using DataAnnotations. Problem is, when it comes to save them, I'm not sure how to process the validation, since they're not bound directly to any data context, but rather,...

POCO in Entity Framework with snapshot change detection

Hi, I have a Visual Studio 2010 generated set of POCO classes (just out of the box POCO templates generated from DB Schema). For a given use case I let the user load an entity (a CRM contact) and act on it - add Phone Numbers (which in itself is a separate entity related by foreign key) and address (also a separate entity) etc. In bet...

How to leverage concurrency checking with EF 4.0 POCO Self Tracking Entities in a N-Tier scenario?

I'm using VS1010RC with the POCO self tracking T4 templates. In my WCF update service method I am using something similar to the following: using (var context = new MyContext()) { context.MyObjects.ApplyChanges(myObject); context.SaveChanges(); } This works fine until I set ConcurrencyMode=Fixed on the entity and then I get an ex...

poco Lib dosnt compile in vs express 9

Hello all im trying to compile the poco lib in vs express 2008 but im keep getting this error : poco-1.3.6p2\foundation\src\eventlogchannel.cpp(40) : fatal error C1083: Cannot open include file: 'pocomsg.h': No such file or directory no i have the mc.exe in my sdk and all the paths in the IDE are seams to be right and nada . does any ...

Generate POCO classes in different project to the project with Entity Framework model

I'm trying to use the Repository Pattern with EF4 using VS2010. To this end I am using POCO code generation by right clicking on the entity model designer and clicking Add code generation item. I then select the POCO template and get my classes. What I would like to be able to do is have my solution structured into separate projects fo...

POCO Best Practice

All, I have a series of domain objects (project is NHibernate based). Currently as per 'good practice' they define only the business objects, comprising properties and methods specific to each objects function within the domain. However one of the objects has a requirement to send an SMTP message. I have a simple SMTP client class def...

Entity Framework 4 / POCO - Where to start?

Hi, I've been programming for a while and have used LINQ-To-SQL and LINQ-To-Entities before (although when using entities it has been on a Entity/Table 1-1 relationship - ie not much different than L2SQL) I've been doing a lot of reading about Inversion of Control, Unit of Work, POCO and repository patterns and would like to use this m...

EDM -> POCO -> WCF (.NET4) But transferring Collections causes IsReadOnly set to TRUE

Ok, this may sound a little 'unorthodox', but...using VS2010 and the new POCO t4 template for Entity Framework (http://tinyurl.com/y8wnkt2), I can generate nice POCO's. I can then use these POCO's (as DTO's) in a WCF service essentially going from EDM all the way through to the client. Kinda what this guys is doing (http://tinyurl.com/yb...

What is PocoCapsule current status?

What is PocoCapsule current status? Is it evolving? Has it been forked with some other product? What is about the whole idea of IoC for C++? If PocoCapsule is not evolving, is it because IoC was considered not useful for C++, unsafe, other patterns appeared or something else? As far as I understand there are 2-3, maybe few more products...

How to link Poco library(libraries) to our program in unix environment

Hi, i'm having trouble with Poco libraries. I need a simple solution to make the compilation easier. Is there any pkg-config file for Poco library to use it into our make files? Or any alternative solution? Currently i use Ubuntu gnu/linux. ...

How to normalize / refactor e-commerce tables to Pocos when the data is much like EAV.

In our e-commerce application, we have different kinds of products having different kinds of attributes, e.g., a shoe has different selling features than an edible cake. Our e-commerce site allows you to "build" your own products, selecting various attributes and values (like pink frosting on a cup cake which adds $.25 to the cost). Ou...

Different EF Property DataType than Storage Layer Possible?

Hi, I am putting together a WCF Data Service for PatientEntities using Entity Framework. My solution needs to address these requirements: Property DateOfBirth of entity Patient is stored in SQL Server as string. It would be ideal if the entity class did not also use the "string" type but rather a DateTime type. (I would expect this t...

[EF 4 POCO] Problem with INSERT...

Hi all, I'm so frustrated because of this problem, you have no idea... I have 2 classes: Post and Comment. I use EF 4 POCO support, I don't have foreign key columns in my .edmx model (Comment class doesn't have PostID property, but has Post property) class Comment { public Post post { get; set; } // ... } class Post { publ...