Example #1
0
        private void Create(BidInput input)
        {
            var entity = ObjectMapper.Map <Bid>(input);

            SetAuditInsert(entity);
            repository.Insert(entity);
            CurrentUnitOfWork.SaveChanges();
        }
Example #2
0
 public void CreateOrEditBid(BidInput input)
 {
     if (input.Id == 0)
     {
         Create(input);
     }
     else
     {
         Update(input);
     }
 }
Example #3
0
        private void Update(BidInput input)
        {
            var entity = repository.GetAll().Where(x => !x.IsDelete).SingleOrDefault(x => x.Id == input.Id);

            if (entity == null)
            {
            }
            ObjectMapper.Map(input, entity);
            SetAuditEdit(entity);
            repository.Update(entity);
            CurrentUnitOfWork.SaveChanges();
        }
Example #4
0
 public void CreateOrEditBid([FromBody] BidInput input)
 {
     bidAppService.CreateOrEditBid(input);
 }