public async Task <long> AddAsync(VinculadoRequest VinculadoRequest) { var vinculado = new Vinculado { Cedula = VinculadoRequest.Cedula, Nombre = VinculadoRequest.Nombre }; return(await _vinculadoRepo.AddAsync(vinculado)); }
public async Task <int> AddAsync(Vinculado vinculado) { using (IDbConnection dbConnection = _connection) { string query = @"INSERT INTO [dbo].[Vinculado] ( [Cedula], [Nombre]) VALUES ( @Cedula, @Nombre)"; int idVinculado = await dbConnection.ExecuteAsync(query, vinculado); return(idVinculado); } }