playwander
Junior Member
Em chưa hiểu lắm, bác có thể quote lại cụ thể đoạn đó giúp em được không ạ
C#:private bool verifyAccount(LoginRequest request) { SecurityConfiguration securityConfiguration = new SecurityConfiguration(); string username = request.Username; string password = request.Password; // string passwordEncoded = securityConfiguration.encodePassword(request.Password)[1]; FormattableString sql = $"SELECT * FROM Students WHERE Username = {username}"; var student = context.Students.FromSql(sql).ToList(); return (student != null) ? true : false; }
tự gạch, ef core nó tự tham số hóa luôn chứ không phải nối chuỗi như mình thấyhttps://www.learnentityframeworkcore.com/raw-sql/from-sql
