Ejemplo n.º 1
0
        public async Task <bool> SignUp(Account model)
        {
            // implement sign up logic here

            var result = false;

            if (model.IsValidate)
            {
                var exitAccount = AccountDb.AsQueryable().FirstAsync(a => a.Name == model.Name);
                if (!exitAccount.IsNull())
                {
                    result = false;
                }
                else
                {
                    result = await AccountDb.AsInsertable(model).ExecuteCommandAsync() > 0;
                }
            }

            return(result);
        }