示例#1
0
        public override async Task InsertAsync(MeetingAgenda entity)
        {
            foreach (var user in entity.MeetingAgendaUsers)
            {
                user.CreatedBy   = entity.CreatedBy;
                user.CreatedDate = DateTime.Now;
                user.UpdatedBy   = entity.UpdatedBy;
                user.UpdatedDate = DateTime.Now;
            }

            await Dbset.AddAsync(entity);
        }
示例#2
0
        public override async Task InsertAsync(MeetingNote entity)
        {
            var note = await this.Dbset
                       .FirstOrDefaultAsync(x => x.UserId == entity.UserId && x.MeetingContentId == entity.MeetingContentId);

            if (note != null)
            {
                this.Dbset.Remove(note);
            }

            await Dbset.AddAsync(entity);
        }