public async Task ExecuteAsync(Guid postID)
 {
     _ipManDataContext.Posts.Remove(new Post {
         ID = postID
     });
     await _ipManDataContext.SaveChangesAsync();
 }
Esempio n. 2
0
 public async Task ExecuteAsync(SiteAccount siteAccount, bool isInsert = false)
 {
     if (isInsert)
     {
         _ipManDataContext.Add <SiteAccount>(siteAccount);
     }
     else
     {
         _ipManDataContext.Update <SiteAccount>(siteAccount);
     }
     await _ipManDataContext.SaveChangesAsync();
 }
Esempio n. 3
0
 public async Task ExecuteAsync(Person person, bool isInsert = false)
 {
     if (isInsert)
     {
         var savedPost = _ipManDataContext.Add <Person>(person).Entity;
     }
     else
     {
         _ipManDataContext.Update <Person>(person);
     }
     await _ipManDataContext.SaveChangesAsync();
 }