示例#1
0
        public AccountsAccessLevelOfWebsite ToEntity(AccountsAccessLevelOfWebsite entity, AddWebsiteAccountDto dto)
        {
            entity.AccountId    = dto.AccountId;
            entity.AccessLevels = dto.AccessLevels;

            return(entity);
        }
示例#2
0
 public bool Create()
 {
     if (!Save())
     {
         return(false);
     }
     WebsiteId = _website.Id;
     if (_website.Accounts != null && _website.Accounts.Any())
     {
         var accList = new AccountsAccessLevelOfWebsite[_website.Accounts.Count];
         _website.Accounts.CopyTo(accList);
         foreach (var acc in accList)
         {
             var addWebsiteAccount = new AddWebsiteAccountDto()
             {
                 AccessLevels = acc.AccessLevels, AccountId = acc.AccountId
             };
             this.AddAccount(addWebsiteAccount);
         }
     }
     return(true);
 }