BusinessLogicLayer.Logic.CreateAccount C# (CSharp) Method

CreateAccount() public method

public CreateAccount ( Account account ) : bool
account Entities.Account
return bool
        public bool CreateAccount(Account account)
        {
            if (GetAccountByLogin(account.Login, true) != null)
                return false;

            account.Id = Guid.NewGuid();
            account.CreatedTime = DateTime.Now;

            if (account.Avatar == null)
                account.Avatar = _basixAvatar;
            if (account.City == null)
                account.City = _basixCity;
            if (account.Country == null)
                account.Country = _basixCountry;
            if (account.MimeType == null)
                account.MimeType = _basixMimeType;
            _data.CreateAccount(account);
            return true;
        }