Beispiel #1
0
        public async Task CreateMarksForSubject(int id, IEnumerable <Mark> marks)
        {
            var marksWithIdentity = marks.Select(mark =>
            {
                if (mark.Id == 0)
                {
                    _markIdentityAssignService.AssignIdentity(mark);
                }
                return(mark);
            }).ToList();

            await UpdateMarksForSubject(id, marksWithIdentity).ConfigureAwait(false);
        }
Beispiel #2
0
 public async Task Create(Student entity)
 {
     _identityAssignService.AssignIdentity(entity);
     await _mongoCollection.InsertOneAsync(entity).ConfigureAwait(false);
 }