public void Execute(Domain.StatusModel status) { var statusToUpdate = _repo.Status.FindByCondition(x => x.Id == status.Id).FirstOrDefault(); statusToUpdate.StatusName = status.StatusName; _repo.Status.Update(statusToUpdate); _repo.Save(); }
public int Execute(Domain.StatusModel status) { var newStatus = new Entities.Models.Status { StatusName = status.StatusName }; _repo.Status.Create(newStatus); _repo.Save(); return(newStatus.Id); }