19 lines
531 B
C#
19 lines
531 B
C#
|
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<QuoteFlag> Flags { get; set; }
|
|||
|
}
|
|||
|
}
|