public virtual async Task <IHttpActionResult> UpsertFuelData(FuelDataContract data) { data.UserName = User.Identity.Name; var service = Bootstrapper.Container.Resolve <IFuelService>(); var result = await Task.Run(() => service.UpsertDataEntry(data)); return(Ok(result)); }
private static void FuelCoalDomesticTonnes(FileHandlerBase <GenericDataContract> handler, GenericDataContract obj) { var data = new FuelDataContract { CostCode = obj.CostCode, EndDate = obj.EndDate, Money = obj.Money, RowNo = obj.RowNo, SourceId = obj.SourceId, StartDate = obj.StartDate, Units = obj.Units, FuelType = WCF.Fuel.FuelType.CoalDomestic, UOM = UnitOfMeasure.Tonnes }; handler.CallService <IFuelService>(service => service.UpsertDataEntry(data)); }