Exemple #1
0
        public void Update(TDateFormat dateFormat)
        {
            ThrowIfDisposed();
            ThrowIfArgumentIsNull(dateFormat, nameof(dateFormat));

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