TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sal Maglione
NA
9
1.7k
ASP application Error/valid handling with Repository pattern
Oct 27 2015 1:50 PM
The Action: Create New User
Controller - calls repository Create
in the Create method you edit if the user id is already in database. If it is you want to avoid an insert and returnthe error
ModelSate cannot be updated to signal the controller an error
once the validation is moved from the controller what is the best pattern to use.
in the above scenario a new Repository can be implemented 'DoesUserExist' to return the user name in the event the user id already exist.
This is a simple edit - but what if the validation is complex? How would one implement a robust validation process using the repository pattern
Reply
Answers (
0
)
how can i Save Image in Project Folder using javascript
Save date while check the datagridviewcheckbox in c#