Will it be a good solution if a web service directly communicate with database, is it recommended? Further is there any development or helping material to fulfill the requirement like sending auto-emails to customer email address and verifying mobile number
as well using One Time Password (OTP).
The Repository object in the Repository layer can have many responsibilities, and DB access is just one of the responsibilities where the Repository object calls objects in the Data Access Layer to do CRUD operations with the DB.
The Repository object would call Data Access Objects in the DAL to do CRUD with the DB.
None
0 Points
5 Posts
Web Service and Database Communication
Oct 20, 2017 09:06 AM|tanvir.mughal|LINK
Will it be a good solution if a web service directly communicate with database, is it recommended? Further is there any development or helping material to fulfill the requirement like sending auto-emails to customer email address and verifying mobile number as well using One Time Password (OTP).
Contributor
4973 Points
4263 Posts
Re: Web Service and Database Communication
Oct 20, 2017 10:09 AM|DA924|LINK
The Repository, the Repository pattern, sits behind the Web service.
https://msdn.microsoft.com/en-us/library/ff649690.aspx
The Repository object in the Repository layer can have many responsibilities, and DB access is just one of the responsibilities where the Repository object calls objects in the Data Access Layer to do CRUD operations with the DB.
The Repository object would call Data Access Objects in the DAL to do CRUD with the DB.
http://blog.sapiensworks.com/post/2012/11/01/Repository-vs-DAO.aspx
https://www.tutorialspoint.com/design_pattern/data_access_object_pattern.htm
You don't send datasets with datatables through a Web service.
https://dzone.com/articles/reasons-move-datatables
What you send through the layers and through the Web service is a DTO.
https://en.wikipedia.org/wiki/Data_transfer_object
https://www.codeproject.com/Articles/1050468/Data-Transfer-Object-Design-Pattern-in-Csharp
Like I said, the Repository object is not solely for database access.
None
0 Points
5 Posts
Re: Web Service and Database Communication
Oct 20, 2017 10:18 AM|tanvir.mughal|LINK
Which Algo is best for OTP (one time password)? Any help full link please?
Contributor
4973 Points
4263 Posts
Re: Web Service and Database Communication
Oct 20, 2017 12:56 PM|DA924|LINK
https://github.com/kspearrin/Otp.NET