Exemplo n.º 1
0
        public ActionResult <ITipoServicoDominio> Get(int Id)
        {
            servicoFactory = ServicoFactory.Create(this.isolationLevel);
            TipoServicoAbstract tipoServico   = servicoFactory.getTipoServico();
            ITipoServicoDominio tiposServicos = tipoServico.Get(Id);

            return(Ok(tiposServicos));
        }
Exemplo n.º 2
0
        public async Task <ActionResult <IEnumerable <ITipoServicoDominio> > > Gets()
        {
            servicoFactory = ServicoFactory.Create(this.isolationLevel);
            TipoServicoAbstract        tipoServico   = servicoFactory.getTipoServico();
            List <ITipoServicoDominio> tiposServicos = await tipoServico.GetsAsync();

            return(Json(tiposServicos.ToList()));
        }
        public void Incluir()
        {
            IsolationLevel isolationLevel = IsolationLevel.ReadUncommitted;

            ServicoFactory factory     = ServicoFactory.Create(isolationLevel);
            var            TipoServico = factory.getTipoServico();

            ITipoServicoDominio tipo = new TipoServicoViewModel();

            tipo.caminhoDaImage = "/teste/teste.jpg";
            tipo.Descricao      = "Teste do celso";
            tipo.Nome           = "Teste UNIT Inclusão";
            tipo.Status         = "AT";
            Task <TipoServicoAbstract> retorno = TipoServico.Incluir(tipo);
        }