コード例 #1
0
        public void Update(TDateFormat dateFormat)
        {
            ThrowIfDisposed();
            ThrowIfArgumentIsNull(dateFormat, nameof(dateFormat));

            DaAsyncHelper.RunSync(() => UpdateAsync(dateFormat));
        }
コード例 #2
0
        private static void CreateSystemRoles()
        {
            string[] systemRoles = { DaRole.GLOBAL_SUPER_ADMIN, DaRole.TENANT_SUPER_ADMIN, DaRole.USER };

            var    roleManager = new DaRoleManager(new DaRoleRepository(IdentityDbContext));
            DaRole role        = null;

            foreach (var systemRole in systemRoles)
            {
                role      = new DaRole();
                role.Name = systemRole;

                var result = DaAsyncHelper.RunSync <IdentityResult>(() => roleManager.CreateAsync(role));

                if (!result.Succeeded)
                {
                    if (result.Errors != null && result.Errors.Count() > 0)
                    {
                        StringBuilder sbMessages = new StringBuilder();

                        foreach (var err in result.Errors)
                        {
                            sbMessages.Append(err + " ");
                        }

                        throw new Exception(sbMessages.ToString());
                    }
                }
            }
        }
コード例 #3
0
 public virtual void Update(TFeature feature)
 {
     DaAsyncHelper.RunSync(() => UpdateAsync(feature));
 }
コード例 #4
0
 public virtual TFeature FindByName(string name)
 {
     return(DaAsyncHelper.RunSync <TFeature>(() => FindByKeyAsync(name)));
 }
コード例 #5
0
 public virtual TFeature FindById(TKey id)
 {
     return(DaAsyncHelper.RunSync <TFeature>(() => FindByIdAsync(id)));
 }
コード例 #6
0
 public bool CheckTenantUserActiveAssociation(TKey tenantId, TKey userId)
 {
     return(DaAsyncHelper.RunSync <bool>(() => CheckTenantUserActiveAssociationAsync(tenantId, userId)));
 }
コード例 #7
0
 public TTenant FindByKey(string tenantKey)
 {
     return(DaAsyncHelper.RunSync <TTenant>(() => FindByKeyAsync(tenantKey)));
 }
コード例 #8
0
 public void Update(TTenant tenant)
 {
     DaAsyncHelper.RunSync(() => UpdateAsync(tenant));
 }
コード例 #9
0
 public virtual TUserProfile FindById(TKey id)
 {
     return(DaAsyncHelper.RunSync <TUserProfile>(() => FindByIdAsync(id)));
 }
コード例 #10
0
 public virtual void Delete(TUserProfile userProfile)
 {
     DaAsyncHelper.RunSync(() => DeleteAsync(userProfile));
 }
コード例 #11
0
 public List <TSystemLanguage> FindByCountryId(TKey countryId)
 {
     return(DaAsyncHelper.RunSync <List <TSystemLanguage> >(() => FindByCountryIdAsync(countryId)));
 }
コード例 #12
0
 public TSystemLanguage FindById(TKey id)
 {
     return(DaAsyncHelper.RunSync <TSystemLanguage>(() => FindByIdAsync(id)));
 }
コード例 #13
0
 public List <TSystemLanguage> FindAll()
 {
     return(DaAsyncHelper.RunSync <List <TSystemLanguage> >(() => FindAllAsync()));
 }
コード例 #14
0
 public void Delete(TSystemLanguage systemLanguage)
 {
     DaAsyncHelper.RunSync(() => DeleteAsync(systemLanguage));
 }
コード例 #15
0
 public void Update(TSystemLanguage systemLanguage)
 {
     DaAsyncHelper.RunSync(() => UpdateAsync(systemLanguage));
 }
コード例 #16
0
 public virtual List <TAccount> FindByOwnerUserId(TKey ownerUserId)
 {
     return(DaAsyncHelper.RunSync <List <TAccount> >(() => FindByOwnerUserIdAsync(ownerUserId)));
 }
コード例 #17
0
 public void Create(TTenant tenant)
 {
     ThrowIfDisposed();
     ThrowIfArgumentIsNull(tenant, "tenant");
     DaAsyncHelper.RunSync(() => CreateAsync(tenant));
 }
コード例 #18
0
 public virtual List <TUserProfile> FindByUserId(TKey userId)
 {
     return(DaAsyncHelper.RunSync <List <TUserProfile> >(() => FindByUserIdAsync(userId)));
 }
コード例 #19
0
 public TTenant FindById(TKey tenantId)
 {
     return(DaAsyncHelper.RunSync <TTenant>(() => FindByIdAsync(tenantId)));
 }
コード例 #20
0
 public virtual void Delete(TSubscriptionPlan subscriptionPlan)
 {
     DaAsyncHelper.RunSync(() => DeleteAsync(subscriptionPlan));
 }
コード例 #21
0
 public List <TTenant> FindByUserId(TKey userId)
 {
     return(DaAsyncHelper.RunSync <List <TTenant> >(() => FindByUserIdAsync(userId)));
 }
コード例 #22
0
 public virtual TSubscriptionPlan FindById(TKey id)
 {
     return(DaAsyncHelper.RunSync <TSubscriptionPlan>(() => FindByIdAsync(id)));
 }
コード例 #23
0
 public virtual void Delete(TFeature feature)
 {
     DaAsyncHelper.RunSync(() => DeleteAsync(feature));
 }
コード例 #24
0
 public virtual List <TSubscriptionPlan> FindAll()
 {
     return(DaAsyncHelper.RunSync <List <TSubscriptionPlan> >(() => FindAllAsync()));
 }
コード例 #25
0
 public virtual List <TFeature> FindAll()
 {
     return(DaAsyncHelper.RunSync <List <TFeature> >(() => FindAllAsync()));
 }
コード例 #26
0
 public virtual void Create(TTransaction feature)
 {
     DaAsyncHelper.RunSync(() => CreateAsync(feature));
 }
コード例 #27
0
 public virtual string CreateValidFeatureKey(TFeature feature)
 {
     return(DaAsyncHelper.RunSync <string>(() => CreateValidFeatureKeyAsync(feature)));
 }
コード例 #28
0
 public virtual TAccount FindById(TKey id)
 {
     return(DaAsyncHelper.RunSync <TAccount>(() => FindByIdAsync(id)));
 }
コード例 #29
0
 public virtual void Publish(TFeature feature)
 {
     DaAsyncHelper.RunSync(() => PublishAsync(feature));
 }
コード例 #30
0
 public virtual List <TAccount> FindByTenantId(TKey tenatId)
 {
     return(DaAsyncHelper.RunSync <List <TAccount> >(() => FindByTenantIdAsync(tenatId)));
 }