public static DailyActivity NewActivity(Guid channelId) { var activity = new DailyActivity { ActivityDate = DateTime.Now, DailyActivityId = Guid.NewGuid(), }; return activity; }
public static Channel GetChannelByClientId(Guid clientId) { var moonDb = new MoonAidAzureContext(); var channel = moonDb.Channels .FirstOrDefault(c => c.OwnerId == clientId); var newActivity = new DailyActivity(); channel.DailyActivities.Add(newActivity); return channel; }