示例#1
0
        public async Task Create(GeneroDTO genero)
        {
            ValidationResult result = new GeneroValidator().Validate(genero);

            result.ThrowExceptionIfFail();

            await _generorepository.Create(genero);
        }
示例#2
0
 public byte Create(Genero entity)
 {
     using (var trans = new TransactionScope())
     {
         var id = _GeneroRepository.Create(entity);
         trans.Complete();
         return(id);
     }
 }
 public async Task <Genero> Create(Genero obj)
 {
     return(await _repository.Create(obj));
 }