I'm using the following:
Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005.ConnectionString(connectionString))
.Mappings(m => m.AutoMappings.Add(AutoMap.AssemblyOf<Incident>()
.Where(t => t.Namespace.StartsWith("EDA.DomainModel.POCO"))))
.ExposeConfiguration(BuildSchema)
.BuildSessionFac...
I have a bunch of POCO's that I created that I want to create a persistent layer for. Thing is, I really don't care how the data is stored in SQL Server, I just want it to be stored. In other words, I want to tell the ORM tool, "Here's some POCO classes, save them." and not have to do anything beyond that. Is there any ORM tool for C# th...
I have a bunch of POCOs that all relate to each other in a big tree. For example, this is the top-level element:
public class Incident : Entity<Incident>
{
public virtual string Name { get; set; }
public virtual DateTime Date { get; set; }
public virtual IEnumerable<Site> Sites { get; set; }
public Incident()
{
...
Here is the confusing page. Search for "/bin/ps".
The line is:
ProcessHandle ph(launch("/bin/ps", args, &outPipe, 0, 0));
Shouldnt it be:
ProcessHandle ph(launch("/bin/ps", args, 0, &outPipe, 0));
?
...
I've read the questions asking about the right way to inject data access into POCOs, and the consensus seems to be "don't". Fine, what is the right way then? If I have an Order object, and I want a list of the OrderLines, I don't want to explicitly assign that list to the POCO externally, that's horribly ugly. So if I can't use DI to giv...
i see this pattern over and over again and wanted to get opinions:
Option 1: On the wire object and Business object composition:
On the wire object - the data that is serialized and sent back and forth across machines (client / server, etc). This is a POCO object.
For example:
public class Order
{
public int Price;
publi...
Are there any closed or open source projects for a XML serializer for C# that can serialize for the most part any object without the need to pollute my domain objects with tons of attributes? That will also handle serialization of collections built with the internal generics classes? A bonus would be that it can handle serializing an int...
I have read some articles on POCO in the enttity framework but still don't understand what I can use it for. How can POCO benefit my projects?
...
Let's say I have a POCO:
public class Person
{
public string Name { get; set; }
public DateTime DateOfBirth { get; set; }
public IList<Person> Relatives { get; set; }
}
I want to compare two instances of Person to see if they're equal to each other. Naturally, I would compare Name, DateOfBirth, and the Relatives collection...
Hi all
I'm starting a new project and I'm looking around for either a very good ORM or for a non-SQL-based persistence layer.
For this project, I really don't care on how the data is persisted, as long as it can be queried and stored with a reasonable speed and most importantly with simple queries.
Concurrency should be handled seamlessl...
Hi,
When creating an n-tier solution, I don't want to expose my business objects, but use DTO's instead of this. On the other side, I don't want to doubly define objects and write copy-code all the time.
Now my idea would be to write DTOs that contain all necessary fields and properties, but no logic (only state).
Then I would derive ...
I've been trying to statically link against a C++ library called Poco on Windows using the Visual Studio 2008 command line tools.
I build my program with:
cl /I..\poco\lib /c myapp.cpp
link /libpath:..\poco\lib myapp.obj PocoNet.lib
This results in an exe that at runtime requires PocoNet.dll and PocoFoundation.dll.
I spent some time...
I will like to know that is there a way to exclude some fields from the database? For eg:
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
public string FatherName { get; set; }
public bool IsMale { get; set; }
public bool IsMarried { get; set; }
public string AddressAs { get...
I'm trying to write a Compare method to compare properties in some POCOs using Reflection to ensure that they've been persisted to the database correctly. For example, let's say I have this POCO:
public class NoahsArk
{
public string Owner { get; set; }
public ICollection<Animal> Animals { get; set; }
}
What I want to do is th...
I creating a small desktop application using Qt and Poco on Mac OS X Snow Leopard.
Qt works fine, but once I started linking with Poco I get the following warning:
ld: warning: in /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libPocoFoundation.8.dylib, file is not of required architecture
Also when I link against the 10.5 SDK:
ld: wa...
I started a small project and wanted to use Subsonic's SimpleRepository for my database layer. If I have table in my database called Member and I want to create a POCO called TeamMember. Can I map class TeamMember to table Member via an attribute or some other method? It is possible that what I'm asking is not how the SimpleRepositor...
Hi folks,
with my Repository classes, I use LinqToSql to retrieve the data from the repository (eg. Sql Server 2008, in my example). I place the result data into a POCO object. Works great :)
Now, if my POCO object has a child property, (which is another POCO object or an IList), i'm trying to figure out a way to populate that data. I'...
I've been following a mostly DDD methodology for this project, so, like any DDD'er, I created my domain model classes first. My intention is to use these POCO's as my LINQ-to-SQL entities (yes, they're not pure POCO's, but I'm ok with that). I've started creating the database schema and external mapping XML file, but I'm running into som...
Are the two code samples below equivalent?
Poco::ProcessHandle::PID ProcessRunner::processId() const
{
Poco::ProcessHandle::PID pid = 0;
mMutex.lock();
pid = mPID;
mMutex.unlock();
return pid;
}
,
Poco::ProcessHandle::PID ProcessRunner::processId() const
{
Poco::ScopedLock<Poco::Mutex> lock(mMutex);
return...
I've formerly used L2S and am looking at using NHib along with the Sharp Architecture on a project. I've started prototyping and come up against the first issue which i have no idea how to google for.
Given a POCO with some simple properties, and one reference property (Category - class not shown here):
public class Post
{
public Pos...