示例#1
0
        public async Task <IActionResult> GetEmail([FromQuery] string email)
        {
            if (email == "")
            {
                ErrorViewModel.IsEmptyEmail();
            }
            var isEmail = await db.Users.FirstOrDefaultAsync(e => e.Email == email);

            if (isEmail != null)
            {
                ErrorViewModel.EmailNotEmpty();
            }
            return(Ok("email свободен."));
        }