public async Task <ActionResult> Update(OutModels.Models.EnergyUsage formula)
 {
     try
     {
         EnergyUsageModel am = (EnergyUsageModel)_mapper.Map <OutModels.Models.EnergyUsage, EnergyUsageModel>(formula);
         return(new JsonResult(await this._repository.Update(am)));
     }
     catch (Exception ex)
     {
         return(new JsonResult(ResponseModel.ServerInternalError(data: ex)));
     }
 }
 public async Task <ActionResult> Delete(OutModels.Models.EnergyUsage attribute)
 {
     try
     {
         int id = attribute.E_Id;
         if (id == 0)
         {
             return(new JsonResult(ResponseModel.Error("موردی یافت نشد")));
         }
         return(new JsonResult(await this._repository.LogicalDelete(id)));
     }
     catch (Exception ex)
     {
         return(new JsonResult(ResponseModel.ServerInternalError(data: ex)));
     }
 }