Hi,
I use a POCO lib for my project of email client.
I have a problem with parsing subject of email.
example:
I receive mail with subject like this
=?utf-8?Q?=D0=A2=D0=92=D1=82=D0=B5=D0=BA=D0=B0_=2D_=D1=80=D0=BE=D1=81=D1=81=D0=B8=D0=B9=D1=81=D0=BA=D0=B8=D0=B5_=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D1=8B_=D0=BE=D0=BD=D0=BB=D0=B0=D0=B9=D0=B...
If you populate a drop down list of possible values, you only want the database query to pull two fields, a value and text (like customer ID and Name).
However, your Repository returns POCOs, namely the entire Customer record.
I wouldn't think you should create a POCO for every single DDL list you need, so how does one specify to a rep...
I have a problem trying to get my head around using UTF8 with Poco::XML::XMLWriter. In the following code example, everything works fine when the input contains ASCII characters. However, occasionally the string in wordmapIt->first contains a non-ASCII value, such as a character -105 occurring in the middle of a string. When this happens...
Hi, I'm trying to understand how to use non standard libraries in my C++ projects.
I have a few questions.
Lets say I want to use POCO library. So I downloaded it and build it using make (static build). Now I have bunch of .o files and .h files.
There is a Path.h file and a Path.o file in different directories.
Now I want to use this m...
Let's say that I have two entities, Team and Match. In every Match, there are two teams, the HomeTeam and the AwayTeam. A Team can have many matches, but HomeTeam and AwayTeam can only have one team each. Sometimes Team is a HomeTeam, and sometimes the same Team is an AwayTeam. I have provided just the basics for each of the classes:
pu...
Hi Guys,
I have an Entity Framework 4.0 model implemented with pure POCO's (no code generation, no self-tracking entities, just plain old CLR objects).
Now, here is some code i have in my UI to perform an UPDATE:
[HttpPost]
public ActionResult UpdatePerson(Person person)
{
repository.Attach(person);
unitOfWork.Commit();
}
Es...
I was wondering if anyone has attempted to lazy load a subclass (where is isn't known what the subclass is until the result is returned) using EF and POCOs?
This is a bit of a nightmare in NHibernate, but works as long as you don't attempt to cast the returned result to a subclass (because a proxy of the base class is created, it can't ...
Hi,
I've this simple Entities from DB tables
But i want my POCO classes to be just two classes:
public class Country
{
public string ID { get; set; }
public string Name { get; set; }
public string LocalName { get; set; } // this localized
public string Region { get; set; }
public IEnumerable<City> Cities { get;...
I'm using EF4 with POCO and the code below is what I have to update a license. I only pasted here the section of the code that is relevant to the problem, which is adding LicenseDetails.
The problem is that for each LicenseDetail that are inserted, EF also unexpectadly adds rows to the "Item" lookup table. Why?!
The relationship of bo...
Poco generator for EF 4 is great!
it took me a while to figure out how to use my existing classes as POCO's but i did and it works.
One thing i can't seem to still be able to figure out, is how to use the same class for 2 entities.
Seems that the POCO class has to have the same name as the Entity it is going in place of, and not ju...
I am using this query:
public IEnumerable.....{
var query = from d in Context.Documentos
where d.CodigoEquipamento == documentoDTO.CodigoEquipamento &&
d.Codigo == tipoEquipamentoDTO.Codigo
select new DocumentoDTO
{
Codigo = d.Codigo,
CodigoEquipamento = d.CodigoEqu...
I have 2 tables : Item and Location (one - many ).
I select one location and I try to update it
The entity goes from {Id=2, Name="name1",City="city1",Items=null} to {Id=2, Name="name1", City="city2",Items=null} and i want to save the updates.
The update method from the base class is:
public virtual void Update(T entity)
...