コード例 #1
0
        public static DailyActivity NewActivity(Guid channelId)
        {
            var activity = new DailyActivity
            {
                ActivityDate = DateTime.Now,
                DailyActivityId = Guid.NewGuid(),
            };

            return activity;
        }
コード例 #2
0
        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;
        }