Example #1
0
        public static GroceryItem Parse(SqlDataReader reader)
        {
            GroceryItem item = new GroceryItem();

            try {
                item.UserID         = Convert.ToInt32(reader["UserID"]);
                item.IngredientName = reader["IngredientName"].ToString();
                return(item);
            } catch (Exception ex) {
                return(null);
            }
        }