Ejemplo n.º 1
0
 /// <summary>
 /// Registers the required domain objects.
 /// </summary>
 public void RegisterRequiredDomainObjects()
 {
     try
     {
         Provider <Role> .Save(AuthorizationDomainGenerator.InflateRoles());
     }
     catch (Exception exception)
     {
         _logger.Error(exception.GetCombinedMessages());
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Finds the name of the by user.
        /// </summary>
        public void RegisterRequiredDomainObjects()
        {
            using (var scp = new TransactionScope())
            {
                try
                {
                    var acc = AuthorizationDomainGenerator.CreateGuestAccount();
                    Provider <Account> .Save(acc);

                    var admin = AuthorizationDomainGenerator.CreateAdministratorAccount();
                    Provider <Account> .Save(admin);

                    scp.Complete();
                }
                catch (Exception ex)
                {
                    _logger.Error(ex.GetCombinedMessages());
                }
            }
        }