Questions tagged [poco]

Means Plain Old CLR Object, a simple object that does not follow any object model, convention or framework. For questions about the POCO C++ library, please use [poco-libraries].

Means Plain Old CLR Object, a simple object that does not follow any object model, convention or framework. For questions about the POCO C++ library (http://pocoproject.org), please use [poco-libraries].

1553 questions
0
votes
1 answer

POCO objects Inheritance or Abstract?

Im simply trying to mock up a data model in POCO. But I'm a little confused about something. Lets just assume for this example that I will be using Entity Framework for ORM. First I have a Phone and Address class: public class Phone { int Id {…
Brandon
  • 830
  • 1
  • 15
  • 35
0
votes
1 answer

Entity Framework Code First Many to many Insert

I am using EF code first approach with fluent api. I am having one registration form in my application where in registering candidate can select multiple options from dropdown(Interested In Dropdown on Sign-Up form) that has a predefined set of…
pbhalchandra
  • 287
  • 1
  • 6
  • 14
0
votes
2 answers

DTO to POCO with Lucene

We are using Lucene as the search server for data retrieval. With this come certain complexities that I was unprepared for, not the least of which is managing relationships between objects. I want to create a clean and simple POCO for our domain…
Yevgen Fesenko
  • 177
  • 1
  • 7
0
votes
3 answers

Can I extract an object going over WCF before it goes so that I can manipulate it first

So I am sending entities over WCF. What I would like to do is to have an opportunity to alter the entities in any way I want before they go over. I do not have to do this in the WCF but I don't see another place to do it, as I want one single…
Shumii
  • 4,529
  • 5
  • 32
  • 41
0
votes
2 answers

How can I send POCO Entities through WCF Service when I don't want to track the entity *later*?

I have an ASP.NET MVC 4 project, where Controller calls a WCF Service layer, that calls Business Layer, that use a Repository of EF 5.0 Entities. Then the results are returned as POCO entities to the Controller. It works fine while the WCF Service…
eduardobr
  • 146
  • 15
0
votes
3 answers

POCO in Domain Driven Design(DDD)

The POCO class has behaviors in domain driven design such as Validate() method, Is it true?
Raymound
  • 31
  • 6
0
votes
1 answer

Using EF 5.x DbContext Fluent Generator but properties are not virtual

I used the EF 5.x DbContext Fluent Generator to generate my POCO classes but my properties are not coded as virtual. Don't you have to have that for tracking to occur? Why wouldn't the template already use virtual for properties?
user31673
  • 13,245
  • 12
  • 58
  • 96
0
votes
2 answers

Error updating records with recursive associations using EF and Code First

I want to update a record type graph, which modify the parent object and child objects also having internally. The problem usually occurs when EF UPDATE registry for children puts them to NULL in where children helps identify the records you are…
Ozplc
  • 1,091
  • 2
  • 10
  • 15
0
votes
1 answer

Entity Framework POCO - Navigation Property does not refresh

I have an issue with poco classes in EF 4. I have an Order entity wich contains a foreign key to a Customer entity. So, the Order class has a navigation property of type Customer. It's look like this : public class Order { public virtual int…
0
votes
3 answers

c# Accessing attributes of an entity after having made sure it implements an interface

I need to have certain attributes of my POCO entities updated on certain actions. I defined the following Interfaces: public interface IEntityPOCO { Guid Id { get; set; } } public interface IHasLastChange : IEntityPOCO { DateTime LastChange…
vzwick
  • 11,008
  • 5
  • 43
  • 63
0
votes
2 answers

Asp.net 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 on…
0
votes
1 answer

How to add two different properties of the same class to one POCO class?

I have a class that has two references to one class (User): public class Xpto { public string Username { get; set; } public virtual User User { get; set; } public string Username2 { get; set; } public virtual User User2 { get; set;…
eestein
  • 4,914
  • 8
  • 54
  • 93
0
votes
2 answers

Passing POCOs or EF objects to the Web project?

Say I have a Visual studio solution with two projects: one web project, and one data project. Does it really matter whether I pass the EF object from the data project to the web project, or do I need to explicitly define POCOs in the data project to…
Cody
  • 8,686
  • 18
  • 71
  • 126
0
votes
1 answer

Virtual vs Interface poco, what's faster?

I am maintaining an application which has been designed like this: messy code --abuses--> simplePoco (POCO data capsule) The data capsule is a simple class with lots of getters and setters (properties) It uses a DI framework and consistently use…
chakrit
  • 61,017
  • 25
  • 133
  • 162
0
votes
1 answer

EF Code First schema design - User and Contact

I'm trying to come up with a model for managing Person and its Friends. A Person has 0-to-many Friends A Friend is a Person too - not the same one though A Friend can belong one or more Groups Roughly, the schema looks something like this: I…
Mrchief
  • 75,126
  • 20
  • 142
  • 189
1 2 3
99
100