Beispiel #1
0
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
            DAL.Load(Directory.GetCurrentDirectory() + @"\Connection.ini");

            MarcaDAL entMarca = new MarcaDAL();

            entMarca.nome = "MkAppTeste1";
            List <MarcaDAL> lm = entMarca.GetAll();

            entMarca.Insert();
            lm            = entMarca.GetAll();
            entMarca.nome = "MkAppTeste1Alt";
            entMarca.Update();
            lm = entMarca.GetAll();
            entMarca.Delete();
            lm = entMarca.GetAll();

            PatrimonioDAL entPatrimonio = new PatrimonioDAL();

            entPatrimonio.nome      = "PtrAppTeste1";
            entPatrimonio.descricao = "DescAppTeste";
            entPatrimonio.marcaId   = 1;
            entPatrimonio.numTombo  = "";
            List <PatrimonioDAL> lp = entPatrimonio.GetAll();

            entPatrimonio.Insert();
            lp = entPatrimonio.GetAll();
            entPatrimonio.nome = "PtrAppTeste1Alt";
            entPatrimonio.Update();
            lp = entPatrimonio.GetAll();
            entPatrimonio.Delete();
            lp = entPatrimonio.GetAll();
        }
Beispiel #2
0
 [HttpDelete("{id}")] // Post Patrimonio - Delete
 public JsonResult Delete(Guid id)
 {
     patrimonioDAL.Delete(id);
     return(Json(patrimonioDAL.GetAll()));
 }