public virtual ActionResult CreateList(List <DTO> dtos) { if (!IsValidForCreateList(dtos)) { return(ValidationProblem(ValidationMessage)); } foreach (var dto in dtos) { if (dto.Id > 0) { return(BadRequest()); } if (!IsValidForCreate(dto)) { return(ValidationProblem(ValidationMessage)); } var entity = _mapper.Map <ENT>(dto); _repository.AddEntiy(entity); var response = _mapper.Map <DTO>(entity); } _repository.SaveChanges(); return(Ok(new { Message = "ok" })); }