示例#1
0
        public void Update(UpdateCustomerServiceDTO dto)
        {
            var CS = _DB.CustomerServices.SingleOrDefault(x => x.CustomerId == dto.CustomerId &&
                                                          x.ServiceId == dto.ServiceId && !x.IsDeleted);

            if (CS != null)
            {
                CS.UpdatedAt = DateTime.Now;
                CS.Price     = dto.Price;
                CS.OrderDate = dto.OrderDate;
                _DB.CustomerServices.Update(CS);
                _DB.SaveChanges();
            }
        }
示例#2
0
 public IActionResult Update([FromBody] UpdateCustomerServiceDTO dto)
 {
     _CSService.Update(dto);
     return(Ok(GetResponse("Updated")));
 }