How can i create a model and exclude a few fields from being in the database. I have a user model which new users can put information in but then i want to add a few more strings to the user model so i can have email fields there too but offcourse i don’t want to save those email fields to the database.
something like this ##`public class user {
public string user {}
public string email {} –exclude the email portion from being in database.
}`.##
I have tried doing 2 separate models and putting them into a parentview class but I kept getting an ID error since the parent class has no ID and i dont want to save the email fields in database… any suggestions
You need to add a partial class User with your custom fields
You can check this tutorial for more informations: NerdDinner Step 3: Building the Model