public Task <bool> updateAddressPartsSync(AddressPartsSettingsVM entity) { return(Task.Run(() => { AddressPartsSettings addressPart = new AddressPartsSettings(); { addressPart.AddressPartID = entity.AddressPartID; addressPart.AddressPart1 = entity.AddressPart1; addressPart.AddressPart2 = entity.AddressPart2; addressPart.AddressPart3 = entity.AddressPart3; addressPart.AddressPart4 = entity.AddressPart4; }; partsRepo.Update(addressPart, addressPart.AddressPartID); return true; })); }
public Task <bool> insertAddressPartsSync(AddressPartsSettingsVM entity) { return(Task.Run(() => { AddressPartsSettings addressPart = new AddressPartsSettings(); { addressPart.AddressPartID = entity.AddressPartID; addressPart.AddressPart1 = entity.AddressPart1; addressPart.AddressPart2 = entity.AddressPart2; addressPart.AddressPart3 = entity.AddressPart3; addressPart.AddressPart4 = entity.AddressPart4; addressPart.UID = entity.UID; }; partsRepo.Add(addressPart); return true; })); }
public Task <bool> deleteAddressPartsSync(AddressPartsSettingsVM entity) { return(Task.Run(() => { if (entity != null) { AddressPartsSettings addressPart = new AddressPartsSettings(); { addressPart.AddressPartID = entity.AddressPartID; addressPart.AddressPart1 = entity.AddressPart1; addressPart.AddressPart2 = entity.AddressPart2; addressPart.AddressPart3 = entity.AddressPart3; addressPart.AddressPart4 = entity.AddressPart4; }; partsRepo.Delete(addressPart, addressPart.AddressPartID); } return true; })); }
public async Task <IHttpActionResult> deleteAddressPart(AddressPartsSettingsVM addressPart) { return(Ok(await addressPartService.deleteAddressPartsSync(addressPart))); }