예제 #1
0
 public static BackofficeUserRole Create(IBackofficeUserRole src)
 {
     return(new BackofficeUserRole
     {
         Id = src.Id,
         Features = src.Features,
         Name = src.Name
     });
 }
예제 #2
0
        public static BackOfficeUserRoleEntity Create(IBackofficeUserRole src)
        {
            var result = new BackOfficeUserRoleEntity
            {
                PartitionKey                 = GeneratePartitionKey(),
                RowKey                       = src.Id == null?Guid.NewGuid().ToString("N") : GenegrateRowKey(src.Id),
                                        Name = src.Name
            };

            result.SetFeatures(src.Features);

            return(result);
        }
예제 #3
0
 public async Task SaveAsync(IBackofficeUserRole data)
 {
     BackOfficeUserRoleEntity newEntity = BackOfficeUserRoleEntity.Create(data);
     await _tableStorage.InsertOrReplaceAsync(newEntity);
 }