public static BackofficeUserRole Create(IBackofficeUserRole src) { return(new BackofficeUserRole { Id = src.Id, Features = src.Features, Name = src.Name }); }
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); }
public async Task SaveAsync(IBackofficeUserRole data) { BackOfficeUserRoleEntity newEntity = BackOfficeUserRoleEntity.Create(data); await _tableStorage.InsertOrReplaceAsync(newEntity); }