Exemplo n.º 1
0
 public RetornarPorId RetornarPorId(int id)
 {
     using (var conexao = new SqlConnection(connStr))
     {
         try
         {
             RetornarPorId result = conexao.QueryFirst <RetornarPorId>("select Item.* from Item where ID=@id", new { id = id });
             conexao.Close();
             return(result);
         }
         catch
         {
             throw new Exception();
         }
     }
 }
Exemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            RetornarPorId item = itemDao.RetornarPorId(id);

            return(View(item));
        }