public bool UpdateTicketValidation(int ticketId) { bool isTicketExist = _context.Tickets.Any(t => t.TicketId == ticketId); if (isTicketExist) { var ticket = _context.Tickets.Single(t => t.TicketId == ticketId); ticket.Validated = true; _context.SaveChanges(); return(true); } return(false); }
public async Task <IdentityResult> RegisterUser(UserRegisterModel userModel, UserManager <Actor> userManager) { Actor user = new Actor() { UserName = userModel.UserName }; var result = await userManager.CreateAsync(user, userModel.Password); _context.SaveChanges(); return(result); }