public Favorite Map(MySqlDataReader reader) { Favorite fav = new Favorite(); fav.UserId = reader.GetInt32(0); fav.PostId = reader.GetInt32(1); fav.Annotation = reader.GetString("annotation"); return fav; }
// Make the instance of our subobjects. public DetailPost() { UserInstance = new User(); Comments = new List<Comment>(); FavoriteInstance = new Favorite(); }