public void UpdateCost(int CostId, HotelCostDetail cost)
        {
            var data = context.HotelCostDetails.SingleOrDefault(s => s.CostId == CostId);

            data.Amount      = cost.Amount;
            data.Tax         = cost.Tax;
            data.TotelAmount = cost.TotelAmount;
            context.SaveChanges();
        }
 public ActionResult InsertCost(HotelCostDetail costDetail)
 {
     try
     {
         repository.InsertCost(costDetail);
         return(Ok("Hotel Cost Successfully Inserted"));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
 public ActionResult UpdateCost(int costid, HotelCostDetail costDetail)
 {
     try
     {
         repository.UpdateCost(costid, costDetail);
         return(Ok("Hotel Cost Successfully Updated"));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
 public void InsertCost(HotelCostDetail cost)
 {
     context.HotelCostDetails.Add(cost);
     context.SaveChanges();
 }