User1888235789 posted
hi
I have a class. Inside that class i have one primary method. And i have another 15 methods that i need to check before the primary method executes. The scenario is like this:
method1()
{
Checkmethod1();
Checkmethod2();
Checkmethod3();
.......
Checkmethod15();
Do something.....
}
The check methods all return true or false. If all are true then the code will execute else no.
Now I have two ways to do this.
1) Write the primary method in wcf and check all the other methods in stored procedure. By this I need to only access the database once. The stored procedure will execute all the functions and if all are true it will return true to execute the rest.
2) I need to write all the methods one by one, multiple stored procedures and here the control will go from wcf to db again and again.
I am confused how to deal with this kind of situation without affecting the performance. Can you please suggest me some better idea how to do it?
Thanks