Click here to Skip to main content
15,917,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I going to work on a project ,which have two application a Desktop develop using c# and a website develop using Angular. Both the application have same functionality. If we are writing business logic separately in both application ,it will take more time. so i am thinking to write the all business logic in the stored Procedure and both the application simply use the same stored procedure.
So my doubt is ,is it the good to write all business logic in stored procedure??

What I have tried:

This question are based on Application Acrhitecture. So code is not there in this question.
Posted
Updated 27-Jan-20 22:37pm

Quote:
is it the good to write all business logic in stored procedure??


I doubt that you're able to write all business logic in a single stored procedure. But yes, using stored procedures for CRUD[^] operations is very well and common used practice. For example, you can create separate stored procedure for:
1. READ
2. CREATE/UPDATE
3. DELETE
or
1. READ
2. CREATE
3. UPDATE
4. DELETE

The choice is yours!

Good luck!
 
Share this answer
 
You could have a third project that exposes classes etc that implement the business logic and have both projects reference it. It'll take some juggling to ensure the shared project always works with both other projects, but it's possible.
 
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