コード例 #1
0
 public void UpdatePerson(Person person, UpdateOperations op)
 {
     if (op.HasFlag(UpdateOperations.Delete))
     {
         CurrentDataSource.AddToDeletedItems(new DeletedItem {
             Id = person.Id, EntitySet = "People", Ts = DateTime.Now
         });
     }
     else
     {
         person.Ts = DateTime.Now;
     }
 }
コード例 #2
0
 public void UpdateCompany(Company company, UpdateOperations op)
 {
     if (op.HasFlag(UpdateOperations.Delete))
     {
         CurrentDataSource.AddToDeletedItems(new DeletedItem {
             Id = company.Id, EntitySet = "Companies", Ts = DateTime.Now
         });
     }
     else
     {
         company.Ts = DateTime.Now;
     }
 }