Esempio n. 1
0
        public void ServicoRepositoryAddTest()
        {
            Servico servico = new Servico()
            {
                Cliente_ID    = 1,
                Fornecedor_ID = 1,
                Data          = DateTime.Now,
                Descricao     = "Manutenção",
                TipoServico   = Enum.TipoServico.ServicosGerais,
                Valor         = 100
            };
            ServicoRepository servicoRepository = new ServicoRepository();

            servicoRepository.Add(servico);
            Assert.IsNotNull(servico.Id);
            servicoRepository.Delete(servico.Id);
        }
Esempio n. 2
0
 public ActionResult DeleteConfirmed(int id)
 {
     _servicoRepository.Delete(id);
     return(RedirectToAction("Index"));
 }