Example #1
0
        public async Task <int> CreateModelAsync(ModelDto model)
        {
            var entity = _mapper.Map <Model>(model);
            var added  = await _repository.AddModelAsync(entity);

            await _auditEventLogger.LogEventAsync(new ModelCreatedEvent(model));

            return(added);
        }