We are taking off for a new adventure in development:
It's about developing a framework which will enable us to persist our business objects into databases, file systems or xml file system.


STEP 1: CREATING A BUSINESSOBJECT ATTRIBUTE

namespace
ORMCore
{
///
/// This attribute is used to enable the ORMFramework
/// to create an associate table on the RDBMS
///

[
AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class BusinessObjectAttribute:Attribute
{
private string _databaseName;
public string DatabaseName
{
get
{
return _databaseName;
}
}
private string _databaseConnexionString;
public string DatabaseConnexionString
{
get
{
return _databaseConnexionString;
}
}
public BusinessObjectAttribute(string databaseName)
{
this._databaseName = databaseName;
}
public BusinessObjectAttribute(string databaseName,
string databaseConnexionString)
{
this._databaseName = databaseName;
this._databaseConnexionString = databaseConnexionString;
}
}
}



After that we will create some refflection helpers in order to load the differents components of the assembly, such as the types and for each type the list of the members and so on.




--
Alain Lompo
Excelta - Conseils et services informatiques
MCT
MCSD For Microsoft .Net
MVP Windows Systems Server / Biztalk Server
Certifié ITIL et Microsoft Biztalk Server

Comments

Popular posts from this blog