Exemplo n.º 1
0
        private void Create(POInput input)
        {
            var entity = ObjectMapper.Map <PO>(input);

            SetAuditInsert(entity);
            poRepository.Insert(entity);
            CurrentUnitOfWork.SaveChanges();
        }
Exemplo n.º 2
0
 public void CreateOrEditPO(POInput input)
 {
     if (input.Id == 0)
     {
         Create(input);
     }
     else
     {
         Update(input);
     }
 }
Exemplo n.º 3
0
        private void Update(POInput input)
        {
            var entity = poRepository.GetAll().Where(x => !x.IsDelete).SingleOrDefault(x => x.Id == input.Id);

            if (entity == null)
            {
            }
            ObjectMapper.Map(input, entity);
            SetAuditEdit(entity);
            poRepository.Update(entity);
            CurrentUnitOfWork.SaveChanges();
        }
Exemplo n.º 4
0
 public void CreateOrEditPO([FromBody] POInput input)
 {
     poAppService.CreateOrEditPO(input);
 }