public void Add(Princess princess)
 {
     if (princess != null) {
         _context.Princesses.Add(princess);
         _context.SaveChanges();
     }
 }
 private MessageType Remove(Princess princess)
 {
     if (princess != null) {
         _context.Princesses.Remove(princess);
         _context.SaveChanges();
         return MessageType.Success;
     }
     return MessageType.Error;
 }
 public MessageType Update(Princess princess)
 {
     if (princess != null) {
         _context.Entry(princess).State = EntityState.Modified;
         _context.SaveChanges();
         return MessageType.Success;
     }
     return MessageType.Error;
 }
 public ActionResult Create(Princess princess)
 {
     if (ModelState.IsValid && princess != null) {
         PrincessRepository.Add(princess);
         return Json(new {Redirect = "Princess/"});
     }
     ViewBag.Message = Messages.Error_Field_Check;
     ViewBag.Title = PersonResource.Title_CreatePrincess;
     return PartialView("_Create", princess);
 }
 public ActionResult Edit(Princess princess)
 {
     if (princess == null) {
         return HttpNotFound();
     }
     if (ModelState.IsValid) {
         MessageType messageType = PrincessRepository.Update(princess);
         if (messageType == MessageType.Success) {
             return RedirectToAction("Index");
         }
     }
     return View(princess);
 }