what is the secure way to store data in a database and applying validations too,in a code first approach if i don't want to use code first models.
repository,viewmodel,code first models
if it is viewmodel then what is the safest way to store and if it is code fisrt model then guide me is it a professional way to work?