public async Task <ActionResult> DeleteOrder(int customerID, int orderID) { _orm.OpenConn(); if (!await _orm.CustomerExist(customerID)) { return(NotFound()); } var orderFromDB = await _orm.GetOrderById(orderID); if (orderFromDB == null) { return(NotFound()); } //Map from entity (Source) to nidek (Destination) //Apply Updated fields values to that dto //Map from model (Source) to entity (Destination) //aka. copying values from source to destination await _orm.DeleteOrder(orderID); await _orm.CloseConn(); return(NoContent()); }