CSLA Light KnownTypeAttribute

CSLA Light KnownTypeAttribute

Old forum URL: forums.lhotka.net/forums/t/6747.aspx


CampbellCM posted on Monday, April 06, 2009

Last week I ran into a problem where I was getting the KnownTypeAttribute error because I had a BO that had a property that was based on a struct.  Taking advice from another post I converted the struct to a BO and I was able to move on.  Now I have run into the same error, but this time due to a property that is based on an enumeration.  I'm scratching my head on how to deal with this so I'm looking for some input.

sergeyb replied on Monday, April 06, 2009

I personally have int based property info / property to carry real values, and public property of type enum (without property info) to cast real property’s value to desired enumeration.

 

Just my 2 cents.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: CampbellCM [mailto:cslanet@lhotka.net]
Sent: Monday, April 06, 2009 4:19 PM
To: Sergey Barskiy
Subject: [CSLA .NET] CSLA Light KnownTypeAttribute

 

Last week I ran into a problem where I was getting the KnownTypeAttribute error because I had a BO that had a property that was based on a struct.  Taking advice from another post I converted the struct to a BO and I was able to move on.  Now I have run into the same error, but this time due to a property that is based on an enumeration.  I'm scratching my head on how to deal with this so I'm looking for some input.



CampbellCM replied on Monday, April 06, 2009

Thanks Sergey, I followed your suggestion and it works just fine.

Copyright (c) Marimer LLC