コード例 #1
0
 /// <summary>
 /// Delete  for DisabledCustomer object
 /// if excepion happeneds during Table operation it must be cought in calling method.
 /// </summary>
 /// <param name="obj">instance of DisabledCustomer class to be inserted </param>
 /// <param name="AddToContext">bool paremeter  tell the Context to attach object if it is not tracked by this instance of the Context </param>
 public void DeleteObject(DisabledCustomer obj, bool AddToContext)
 {
     if (AddToContext)
          servCtx.AttachTo(TableName, obj.InternalEntity, "*");
     servCtx.DeleteObject(obj.InternalEntity);
     servCtx.SaveChangesWithRetries();
 }
コード例 #2
0
 /// <summary>
 /// Insert  for DisabledCustomer object 
 /// if excepion happeneds during Table operation it must be cought in calling method.
 /// </summary>
 /// <param name="obj">instance of DisabledCustomer class to be inserted </param>
 public void AddObject(DisabledCustomer obj )
 {
     servCtx.AddObject(TableName, obj.InternalEntity);
     servCtx.SaveChangesWithRetries();
 }