public async Task SavePhotoInspection(string idVe, string photoInspectionJson) { PhotoInspection photoInspection = JsonConvert.DeserializeObject <PhotoInspection>(photoInspectionJson); VehiclwInformation vehiclwInformation = await sqlCommandApiMobile.SavePhotoInspectionInDb(idVe, photoInspection); Task.Run(async() => { ITypeScan typeScan = GetTypeScan(vehiclwInformation.Ask.TypeVehicle.Replace(" ", "")); await typeScan.SetDamage(photoInspection, vehiclwInformation.Ask.TypeVehicle.Replace(" ", ""), vehiclwInformation.Scan.path); }); }
public async Task SaveDamageForUser(string idVech, string idShiping, string damageForUserJson) { List <DamageForUser> damageForUsers = JsonConvert.DeserializeObject <List <DamageForUser> >(damageForUserJson); Task.Run(async() => { VehiclwInformation vehiclwInformation = await sqlCommandApiMobile.GetVehiclwInformationAndSaveDamageForUser(idVech, idShiping, damageForUsers); ITypeScan typeScan = GetTypeScan(vehiclwInformation.Ask.TypeVehicle); await typeScan.SetDamage(damageForUsers, vehiclwInformation.Ask.TypeVehicle, vehiclwInformation.Scan.path); }); }