Calculate years in a calculated POCO property

I'm assuming I'm pretty close. I have a value StartedAgent that will contain a specific date entered by the user. Lets say they entered "1/1/1985" I then want to create a calculated property that I can use to display how many years since this ag

POCO and ViewModels classes in MVC3

I am not an experienced MVC3 developer but I'm trying to be. I am familiar with POCO classes and also ViewModels, as the former describes each classes of the database and the latter is used for strong type views in mvc3. My question is not that compl

Multithreaded issues with Poco :: ServerApplication

I'm using Poco::ServerApplication and Poco::TaskManager at the same time and encountered a wired problem. If start without --daemon option, everything is ok. However when start with --daemon, the task passed to the taskmanager is never started. I deb

How to correctly configure the model, class POCO?

I'm slightly confused on how to properly setup my model. Below you'll see my POCOs and I'm wondering how I can auto increment the ID's and if it's necessary to set the data annotation [Key]. Is there a naming convention of some sort which makes EF re mvc, entity framework, Poco - Architecture

I have a "small" enterprise application, aspnet mvc 3 + entity framework with POCO entity and repository pattern. I structured the solution in 4 projects: POCO entities Domain model Services web application When the application performs a query

Hierarchical objects POCO & amp; deposits

Suppose I have a domain model that has 1:1 correspondence to the physical model. Also: all the tables in the physical model has the column name 'Id' as a primary key Many of the tables have 'LastChanged' timestamp column Some of the tables contain lo

Fill in the list in POCO using subselect - LINQ to Entites

I am trying to create a list of POCOs from my database. The POCO class has a List<int> property which I want to populate like so: public List<Pocos.MyTable> GetData() { using (EFContext c = new EFContext()) { var query = from t in c.MyTable se

Entity Framework 4.1 DbContext Generator Issues

I am new to Entity Framework 4.1 and I really wanted to transition to POCO classes for my model. I found that this was very easy using the "DbContext Generator" item provided when you install EF 4.1. It did exactly what I wanted it to do and gen

Model MVC3 EF-first with POCO and ViewModels

Lots of great posts out here on this topic and I've tried to read them all. I'm a long time n-tier developer but trying to swing into action with an MVC3/EF application. I've generated POCOs via the EF POCO generator(T4). I'm also binding ViewModels

Debug Visual Studio 2010 Templates

I'm using the visual studio POCO Template for the Entity Framework, so far it has worked great, but since my database/tables are not Upper Cammel Case, but UPPER case, every time that i need to regenerate the entities, i also need to (manually) chang

Layered architecture in Entity Framework 4.0

Hi I am trying architect a small project. I planning to have Data acess, Business Service, WcfService, UI Layer. I am trying to use EF 4.0 and MVC 2.0. My question is where to generate the entities and ObjectContext through EF. I initially planned it

EF 4, POCO and AddOrUpdate

I'm trying to create a method on an EF 4 POCO repository called AddOrUpdate. The idea is that the business layer can pass in a POCO object and the persistence framework will add the object if it is new (not yet in the database), else will update the

POCO objects with lazy loading

I'am new to ASP.NET MVC, IoC, POCO, etc. So I want to know is it OK to use such kind of architecture. This is my demo project. Project.Core (this assembly referenced by all project) public class User { public string Name {get; set;} public List<UserG

Entity Update Strategy

There is some discussion on my team about updating entity data and how best to approach it. This is a security framework and so here are some of the constraints and ideas. every table in DB has a PK that is a guid, this is required for our multi-node