Hello,
I am prety new in LLBLGen some maybe it is newbe question.
So, I have web application and web service.
Web service encapsulates all business logic and DB is "hidden" behind it.
Web application uses web service as data provider. Web knows nothing about DB and even generated entity classes. So comunication data types in most cases are primitives or datasets.
I don't care about relations, database fields info, I need only pure data.
For entity collections datasets are perfect.
Example bellow is how I return collections:
[WebMethod]
public DataSet GetFoldersList()
{
ReportAccessItemCollection aList = new ReportAccessItemCollection();
aList.GetMulti(null);
DataSet retVal = new DataSet();
aList.CreateHierarchicalProjection(retVal);
return retVal;
}
I face problem when I want to return single entity as DataSet:
[WebMethod]
public DataSet GetFoldersByKey(int p_nFolderKey)
{
ReportAccessItemEntity anAccess = new ReportAccessItemEntity(p_nFolderKey);
...
DataSet retVal = new DataSet();
...
return retVal;
}
So, I see 3 solutions here:
1. to make fake collection and call CreateHierarchicalProjection function
2. any single object loads proceed with collection GetMulti function with filter(ID = parameter_key) and again CreateHierarchicalProjection function
3. to create nested class in web service class which will be like structure for single object data return
Any other suggestions?
Thank you in advance.
BR,
Marius