public bool Delete(CustomerSonVM entity)
        {
            CustomerSon cus = new CustomerSon
            {
                CUSTOMER_ID        = entity.CUSTOMER_ID,
                CUSTOMER_SON_ID    = entity.CUSTOMER_SON_ID,
                CUSTOMER_BIRTHDATE = entity.CUSTOMER_BIRTHDATE,
                CUSTOMER_SON_NAME  = entity.CUSTOMER_SON_NAME,
                CUSTOMER_SON_ORDER = entity.CUSTOMER_SON_ORDER,
                CUSTOMER_SON_SEX   = entity.CUSTOMER_SON_SEX,
                AddedBy            = entity.AddedBy,
                AddedOn            = entity.AddedOn,
                UpdatedBy          = entity.UpdatedBy,
                updatedOn          = entity.updatedOn
            };

            customerSonRepo.Delete(cus, entity.CUSTOMER_SON_ID);
            return(true);
        }
 public Task <bool> DeleteAsync(CustomerSonVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         CustomerSon cus = new CustomerSon
         {
             CUSTOMER_ID = entity.CUSTOMER_ID,
             CUSTOMER_SON_ID = entity.CUSTOMER_SON_ID,
             CUSTOMER_BIRTHDATE = entity.CUSTOMER_BIRTHDATE,
             CUSTOMER_SON_NAME = entity.CUSTOMER_SON_NAME,
             CUSTOMER_SON_ORDER = entity.CUSTOMER_SON_ORDER,
             CUSTOMER_SON_SEX = entity.CUSTOMER_SON_SEX,
             AddedBy = entity.AddedBy,
             AddedOn = entity.AddedOn,
             UpdatedBy = entity.UpdatedBy,
             updatedOn = entity.updatedOn
         };
         customerSonRepo.Delete(cus, entity.CUSTOMER_SON_ID);
         return true;
     }));
 }
Esempio n. 3
0
 public async Task <IHttpActionResult> delete([FromBody] CustomerSonVM entity)
 {
     return(Ok(await customerSonService.DeleteAsync(entity)));
 }
Esempio n. 4
0
 public async Task <IHttpActionResult> add([FromBody] CustomerSonVM entity)
 {
     return(Ok(await customerSonService.InsertAsync(entity)));
 }