Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<ActionResult> Create(Employee e)
- {
- if (ModelState.IsValid)
- {
- try
- {
- service.Save(e);
- RedirectToAction("Index");
- }
- catch (CorreoExisteException ex)
- {
- ModelState.AddModelError("email", ex.Message);
- }
- catch (CodigoExisteException ex)
- {
- ModelState.AddModelError("code", ex.Message);
- }
- }
- return View(e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement