Click here to Skip to main content
15,903,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am working on a code where the architecture is as follows:

- entities and DTO are generated from tables and views from the database. The data provider layer, validation and CRUD operations are also generated.
- Remains to make the business. The business consists of a series of simple methods. I distinguish two types: the "get" and "save".

C#
public Ilist<MyDto> GetMyDtoBySomethingId(Guid somethingId) {...}
public void SaveMyDto(MyDto my) {...}


I would like to know if it is correct to work with this kind of concept like passing Guid to get something. In each of y business class I have something like unlimited possibilities of get by this or by that with always a Guid as parameter. The get operations return me tables or views. Is that different from old typed dataset? The business seems to be build by the needs of the GUI layer. There is no rules. Fortunately I only have one save operation by DTO and only on DTO generated from real tables and not views.
Posted
Updated 10-Apr-13 23:45pm
v2

1 solution

public List<MyDto> GetMyDtoBySomethingId(Guid somethingId) 
{
//You logic goes here like.....

 MyDto _MyDtoList = new MyDto(); 
}

public void SaveMyDto() 
{
//You logic goes here like.....

     MyDto _My = new MyDto();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900