/// <summary> /// Delete the With Attach Entiy. /// </summary> /// <param name="Entiy">The Entiy.</param> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns> public bool DeleteWithAttachEntiy(ContactDto t) { var dbEntity = typeAdapter.ConvertDtoToEntities(t); entiesrepository.Attach(dbEntity); entiesrepository.Delete(dbEntity); entiesrepository.Save(); return(true); }
public ActionResult Edit(int id, NonCustomer contact) { try { _cRepository = new ContactRepository(_uow); _cRepository.Attach(contact); _uow.Save(); return(RedirectToAction("Index")); } catch { return(View(contact)); } }