internal AtsUser SetEntityKeys()
        {
            var key = AtsUserKey.ForUserId(this.ID);

            this.PartitionKey = key.Partition;
            this.RowKey       = key.Row;

            return(this);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }