I'm trying to select a column from a SQL database using Entity Framework.
I have declared the entity at the top
public static BoWEntity bow;
and I'm trying to select all from a column and put it into a list
var list = bow.users.Select(z => z.username).Distinct().ToList();
However, I get an error
Object reference not set to an instance of an object
My SQL table is not empty, and Entity Framework is properly reflecting the database.
I don't understand why it would give me this error and say its null?