public void ContributionLoan(string adminNationalCode) { var People = dc.PeopleSelectCommand().Where(x => x.IsActive == true); foreach (var person in People) { try { Guid LoanId = Guid.NewGuid(); dc.LoanInsertCommand(LoanId, DateTime.Now, person.Contribution ?? 0, "[NOT DEFIND]", true, adminNationalCode, person.NationalCode, true, true); new InstallementsService().AutomaticInstallement(LoanId, 1); } catch { } } }