public HomeController() { //Create a simple test author Author test = new Author(1, "Test", "*****@*****.**", "testpass"); //Instantiate all categories list categories = new List<ArticleCategory>(); //Create categories only related to this artcle(used for all of them only for test purposes) articleCategories = new List<ArticleCategory>(); articleCategories.Add(new ArticleCategory(1, "Mexico")); articleCategories.Add(new ArticleCategory(2, "Prision")); //Adds the recent created categories in the all categories List foreach (ArticleCategory category in articleCategories){ categories.Add(category); } //Create Articles articles = new List<Article>(); articles.Add(new Article(1, test, "The Latest: 'El Chapo' Being Taken to Same Prison He Escaped", "The latest on Mexican drug lord Joaquin \"El Chapo\" Guzman who was recaptured six months after he escaped from a maximum security prison: (all times local)", "Mexican Attorney General Ariely Gomez says drug lord Joaquin \"El Chapo\" Guzman is being taken back to Antiplano — the same maximum-security prison where he escaped last July 11 using an elaborate tunnel that was dug to his shower stall.<br><br>Guzman was captured by Mexican marines early Friday in a coastal city, and the attorney general says the drug boss was tracked down partly because he was making a biographical movie.<br><br>The attorney general spoke at a ceremony Friday night at Mexico City's airport where Mexican marines displayed Guzman to journalists.<br>Guzman was put on a navy helicopter to be flown to the prison.", "prision, mexico", "", articleCategories)); articles.Add(new Article(2, test, "The Latest: 'El Chapo' Being Taken to Same Prison He Escaped", "The latest on Mexican drug lord Joaquin \"El Chapo\" Guzman who was recaptured six months after he escaped from a maximum security prison: (all times local)", "Mexican Attorney General Ariely Gomez says drug lord Joaquin \"El Chapo\" Guzman is being taken back to Antiplano — the same maximum-security prison where he escaped last July 11 using an elaborate tunnel that was dug to his shower stall.<br><br>Guzman was captured by Mexican marines early Friday in a coastal city, and the attorney general says the drug boss was tracked down partly because he was making a biographical movie.<br><br>The attorney general spoke at a ceremony Friday night at Mexico City's airport where Mexican marines displayed Guzman to journalists.<br>Guzman was put on a navy helicopter to be flown to the prison.", "prision, mexico", "", articleCategories)); articles.Add(new Article(3, test, "The Latest: 'El Chapo' Being Taken to Same Prison He Escaped", "The latest on Mexican drug lord Joaquin \"El Chapo\" Guzman who was recaptured six months after he escaped from a maximum security prison: (all times local)", "Mexican Attorney General Ariely Gomez says drug lord Joaquin \"El Chapo\" Guzman is being taken back to Antiplano — the same maximum-security prison where he escaped last July 11 using an elaborate tunnel that was dug to his shower stall.<br><br>Guzman was captured by Mexican marines early Friday in a coastal city, and the attorney general says the drug boss was tracked down partly because he was making a biographical movie.<br><br>The attorney general spoke at a ceremony Friday night at Mexico City's airport where Mexican marines displayed Guzman to journalists.<br>Guzman was put on a navy helicopter to be flown to the prison.", "prision, mexico", "", articleCategories)); articles.Add(new Article(4, test, "The Latest: 'El Chapo' Being Taken to Same Prison He Escaped", "The latest on Mexican drug lord Joaquin \"El Chapo\" Guzman who was recaptured six months after he escaped from a maximum security prison: (all times local)", "Mexican Attorney General Ariely Gomez says drug lord Joaquin \"El Chapo\" Guzman is being taken back to Antiplano — the same maximum-security prison where he escaped last July 11 using an elaborate tunnel that was dug to his shower stall.<br><br>Guzman was captured by Mexican marines early Friday in a coastal city, and the attorney general says the drug boss was tracked down partly because he was making a biographical movie.<br><br>The attorney general spoke at a ceremony Friday night at Mexico City's airport where Mexican marines displayed Guzman to journalists.<br>Guzman was put on a navy helicopter to be flown to the prison.", "prision, mexico", "", articleCategories)); ViewData["Categories"] = categories; }
public Article(int id, Author author, string title, string description, string content, string tags, string featuredImage, List<ArticleCategory> categories) { this.id = id; this.author = author; this.title = title; this.description = description; this.content = content; this.tags = tags; this.featuredImage = featuredImage; this.categories = categories; }