I am working on a payroll software, i want to ask that i have to calculate the salary of each employee on monthly basis, where should i keep the logic of salary calculation? and also please write the method also of doing it, as i am beginer it will be very
thankful.
The best place to put something like this is in a business layer, a seperate class library. Add a new class library to your project and reference it from the MVC project.
As for writing the method, no one can do that for you, there are so many details to factor in. Plus each application is different and has a specific set of rules. So my advice would to go ahead and try to write the method yourself. If you run into any problems,
post any errors or confusion you might have and the people on this forum will try to offer you advice and try to help you solve your problem.
asad.malik
Member
218 Points
103 Posts
Where to write business logic.
May 02, 2012 04:18 AM|LINK
I am working on a payroll software, i want to ask that i have to calculate the salary of each employee on monthly basis, where should i keep the logic of salary calculation? and also please write the method also of doing it, as i am beginer it will be very thankful.
Regards
Asad
Regards
Asad Malik
Mark as answer if it helps
CodeHobo
All-Star
18647 Points
2647 Posts
Re: Where to write business logic.
May 02, 2012 04:38 AM|LINK
The best place to put something like this is in a business layer, a seperate class library. Add a new class library to your project and reference it from the MVC project.
As for writing the method, no one can do that for you, there are so many details to factor in. Plus each application is different and has a specific set of rules. So my advice would to go ahead and try to write the method yourself. If you run into any problems, post any errors or confusion you might have and the people on this forum will try to offer you advice and try to help you solve your problem.
Blog | Twitter : @Hattan
rio.jones
Member
246 Points
53 Posts
Re: Where to write business logic.
May 02, 2012 04:41 AM|LINK
Hello,
You shouls keep it at BLL or business layer separate from presentation layer.
tusharrs
Contributor
3230 Points
668 Posts
Re: Where to write business logic.
May 02, 2012 04:51 AM|LINK
http://msdn.microsoft.com/en-us/library/aa581779.aspx
( Mark as Answer if it helps you out )
View my Blog