vgquotes/Src/VideoGameQuotes.Web/Models/QuoteModel.cs
2011-02-14 19:14:13 +00:00

25 lines
574 B
C#

using System.Collections.Generic;
using JetBrains.Annotations;
using VideoGameQuotes.Api;
namespace VideoGameQuotes.Web.Models {
public class QuoteCollectionModel {
public IEnumerable<Quote> Quotes { get; set; }
public User User { get; set; }
}
public class QuoteModel {
[NotNull]
public Quote Quote { get; set; }
public User User { get; set; }
public bool VotedUp {
get { return Quote.VotedFor(User) == VoteDirection.Up; }
}
public bool VotedDown {
get { return Quote.VotedFor(User) == VoteDirection.Down; }
}
}
}