23 lines
531 B
C#
23 lines
531 B
C#
|
using System.Collections.Generic;
|
|||
|
using VideoGameQuotes.Api;
|
|||
|
|
|||
|
namespace VideoGameQuotes.Web.Models {
|
|||
|
|
|||
|
public class QuoteCollectionModel {
|
|||
|
public IEnumerable<Quote> Quotes { get; set; }
|
|||
|
public User User { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class QuoteModel {
|
|||
|
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; }
|
|||
|
}
|
|||
|
}
|
|||
|
}
|