public async Task <T> Crear <T>(T objeto) where T : class { try { if (objeto != null) { await contextDb.GetCollection <T>().InsertOneAsync(objeto); return(objeto); } else { throw new ArgumentNullException(typeof(T).Name + " objeto es nulo"); } } catch (Exception ex) { throw ex; } }