예제 #1
0
        public async Task <IActionResult> GetLogin([FromQuery] string login)
        {
            if (login == "")
            {
                ErrorViewModel.IsEmptyUser();
            }
            var isLogin = await db.Users.FirstOrDefaultAsync(l => l.Login == login);

            if (isLogin != null)
            {
                ErrorViewModel.LoginNotEmpty();
            }
            return(Ok("Логин свободен."));
        }