I'm working on ASP.NET MVC4 with Razor, using a model-first Entity Framework connection. I have a Login form made by scratch, that requests for username, password, and Usertype. Unfortunately, the form is able to post even if the fields are blank, which leads to an exception being thrown.
Since I'm directly mapping towards my database through the model instead of using classes on the Models folder, i have no way of applying DataAnnotations. Is there another way to enforce form validation in order to avoid sending null values?