예제 #1
0
 public static Guid SavingsAccount(int personid, decimal amount)
 {
     if (CheckIf.SavingsExistsForPerson(personid))
     {
         var account = Get.SavingsAccount(personid);
         return(account.AccountId);
     }
     else
     {
         return(Insert.SavingsAccount(personid, amount));
     }
 }
예제 #2
0
 public static int Person(string name)
 {
     if (CheckIf.PersonExists(name))
     {
         var person = Get.PersonByName(name);
         Update.Person(person.ID, name);
         return(person.ID);
     }
     else
     {
         return(Insert.Person(name));
     }
 }