private void Create(BidderInput input) { var entity = ObjectMapper.Map <Bidder>(input); SetAuditInsert(entity); repository.Insert(entity); CurrentUnitOfWork.SaveChanges(); }
public void CreateOrEditBidder(BidderInput input) { if (input.Id == 0) { Create(input); } else { Update(input); } }
private void Update(BidderInput 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(); }
public void CreateOrEditBidder([FromBody] BidderInput input) { bidderAppService.CreateOrEditBidder(input); }