using System.Collections.Generic; using System.Linq; using VideoGameQuotes.Api; namespace VideoGameQuotes.Web.Models { public class EditQuoteModel : EditQuoteModelBase { public EditQuoteModel(Quote quote) { QuoteId = quote.Id; Flags = quote.Flags.ToList(); QuoteText = quote.Text; CategoryIds = quote.Categories.Select(category => category.Id).ToList(); GameId = quote.Game.Id; ActionName = "Edit"; } public int QuoteId { get; set; } public List Flags { get; set; } } }