public Users Login(string email, string adgangskode) { Users u = new Users(); Mapper <Users> mapper = new Mapper <Users>(); using (var CMD = new SqlCommand("select * from Bruger where Email=@Email and Password=@Password", Conn.CreateConnection())) { CMD.Parameters.AddWithValue("@Email", email); CMD.Parameters.AddWithValue("@Password", adgangskode); var r = CMD.ExecuteReader(); if (r.Read()) { u = mapper.Map(r); } } return(u); }