public bool FranchiseeTenantUpdatePayment(FranchiseeTenantUpdatePaymentDto franchiseeTenantUpdatePaymentDto) { var franchisee = _franchiseeTenantRepository.FirstOrDefault( o => o.Name == franchiseeTenantUpdatePaymentDto.FranchiseeName && o.LicenseKey == franchiseeTenantUpdatePaymentDto.LicenseKey); using (var scope = new TransactionScope()) { franchisee.RemainingAmount = franchiseeTenantUpdatePaymentDto.Amount; franchiseeTenantUpdatePaymentDto.NextBillingDate = franchiseeTenantUpdatePaymentDto.NextBillingDate; _franchiseeTenantRepository.Update(franchisee); _franchiseeTenantRepository.Commit(); scope.Complete(); return(true); } }
public IHttpActionResult FranchiseeTenantUpdatePayment(FranchiseeTenantUpdatePaymentDto franchiseeTenantUpdatePaymentDto) { return(Ok(_franchiseeTenantService.FranchiseeTenantUpdatePayment(franchiseeTenantUpdatePaymentDto))); }