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();
        }
示例#2
0
        public int Execute(Domain.StatusModel status)
        {
            var newStatus = new Entities.Models.Status
            {
                StatusName = status.StatusName
            };

            _repo.Status.Create(newStatus);
            _repo.Save();
            return(newStatus.Id);
        }