internal AtsUser SetEntityKeys() { var key = AtsUserKey.ForUserId(this.ID); this.PartitionKey = key.Partition; this.RowKey = key.Row; return(this); }
public AtsUser GetByID(Guid id) { var key = AtsUserKey.ForUserId(id); var op = TableOperation.Retrieve <AtsUser>(key.Partition, key.Row); var result = _table.Execute(op); return((AtsUser)result.Result); }
private AtsUser GetUserByReference(AtsUserReferenceKey referenceKey) { var op = TableOperation.Retrieve <AtsUserReference>(referenceKey.Partition, referenceKey.Row); var result = _table.Execute(op); if (result.HttpStatusCode != 200) { return(null); } var reference = (AtsUserReference)result.Result; var userKey = AtsUserKey.ForUserId(reference.UserId); op = TableOperation.Retrieve <AtsUser>(userKey.Partition, userKey.Row); result = _table.Execute(op); return((AtsUser)result.Result); }