Пример #1
0
 public EventModel(string userID, DateTime startTime, DateTime endTime, DateTime artistPickTime, double minPrice, double maxPrice, double optimalPrice)
 {
     ID = IdentificationNumber.NewID();
     OwnedByUser = new IdentificationNumber(userID);
     Entries = new List<IdentificationNumber>();
     StartTime = startTime;
     EndTime = endTime;
     ArtistPickTime = artistPickTime;
     MinPrice = minPrice;
     MaxPrice = maxPrice;
     OptimalPrice = optimalPrice;
 }
Пример #2
0
 public static CommentEntryModel CreateComment(IdentificationNumber userID, IdentificationNumber entryID, string comment)
 {
     CommentEntryModel c = new CommentEntryModel()
     {
         ID = IdentificationNumber.NewID(),
         UserOwned = userID,
         EntryOwned = entryID,
         TimeCreated = DateTime.UtcNow,
         Comment = comment
     };
     return c;
 }