public static DelegationSetting ToDomainModel(this DelegationEntity entity)
 {
     return(new DelegationSetting
     {
         UserName = entity.UserName,
         Realm = new Uri(entity.Realm),
         Description = entity.Description
     });
 }
Exemplo n.º 2
0
        public void DeleteDelegation(string partitionKey, string id)
        {
            var entity = new DelegationEntity
            {
                PartitionKey = partitionKey,
                RowKey       = id
            };

            AttachTo(DelegationTable, entity, "*");
            DeleteObject(entity);
            SaveChangesWithRetries();
        }
        public static DelegationEntity ToEntity(this DelegationSetting model, string partitionKey)
        {
            var entity = new DelegationEntity
            {
                PartitionKey = partitionKey,
                RowKey       = Guid.NewGuid().ToString(),

                UserName    = model.UserName.ToLowerInvariant(),
                Realm       = model.Realm.AbsoluteUri.ToLowerInvariant(),
                Description = model.Description
            };

            return(entity);
        }
Exemplo n.º 4
0
 public void AddDelegation(DelegationEntity entity)
 {
     AddEntity(entity, DelegationTable);
 }
        public static DelegationEntity ToEntity(this DelegationSetting model, string partitionKey)
        {
            var entity = new DelegationEntity
            {
                PartitionKey = partitionKey,
                RowKey = Guid.NewGuid().ToString(),

                UserName = model.UserName.ToLowerInvariant(),
                Realm = model.Realm.AbsoluteUri.ToLowerInvariant(),
                Description = model.Description
            };

            return entity;
        }
        public void DeleteDelegation(string partitionKey, string id)
        {
            var entity = new DelegationEntity
            {
                PartitionKey = partitionKey,
                RowKey = id
            };

            AttachTo(DelegationTable, entity, "*");
            DeleteObject(entity);
            SaveChangesWithRetries();
        }
 public void AddDelegation(DelegationEntity entity)
 {
     AddEntity(entity, DelegationTable);
 }