Beispiel #1
0
 public async Task <int> Save(MyFriendPosition myFriendPosition)
 {
     if (myFriendPosition.MyFriendPositionId > 0)
     {
         _context.Update(myFriendPosition);
         return(await _context.SaveChangesAsync());
     }
     else
     {
         _context.Add(myFriendPosition);
         return(await _context.SaveChangesAsync());
     }
 }
Beispiel #2
0
 public async Task <int> Save(CalcHistoryLog calcHistoryLog)
 {
     if (calcHistoryLog.CalcHistoryLogId > 0)
     {
         _context.Update(calcHistoryLog);
         return(await _context.SaveChangesAsync());
     }
     else
     {
         _context.Add(calcHistoryLog);
         return(await _context.SaveChangesAsync());
     }
 }