public async Task <Provedor> Save(Provedor provedor) { var retorno = await Bd.QueryAsync <int>("INSERT INTO Provedor (nomeProvedor) VALUES (@nomeProvedor); SELECT SCOPE_IDENTITY();", provedor); provedor.SetId(retorno.Single().ToString()); return(provedor); }
public async Task <IEnumerable <Provedor> > List() { return(await Bd.QueryAsync <Provedor>("SELECT * from Provedor")); }