Exemplo n.º 1
0
 public void CreateAccount(Account a)
 {
     var aResult = db.Database.SqlQuery<int>("EXEC CreateAccount @name, @balance, @householdId",
         new SqlParameter("name", a.Name),
         new SqlParameter("balance", a.Balance),
         new SqlParameter("householdId", a.HouseholdId)
         ).First();
 }
Exemplo n.º 2
0
 public void EditAccount(Account a)
 {
     var aResult = db.Database.SqlQuery<Account>("EXEC EditAccount @name, @balance, @accountId",
                     new SqlParameter("name", a.Name),
                     new SqlParameter("balance", a.Balance),
                     new SqlParameter("accountId", a.Id)
                     );
 }
Exemplo n.º 3
0
 public void ArchiveAccount(Account a)
 {
     var aResult = db.Database.SqlQuery<Account>("EXEC ArchiveAccount @accountId",
                     new SqlParameter("accountId", a.Id)
                     );
 }