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