public async Task <IActionResult> AddTypeAppeal(TypeAppeal typeAppeal)
        {
            var repos = new TypeAppealRepository(_context);
            await repos.Add(typeAppeal);

            return(Ok());
        }
        public async Task <IActionResult> GetAllTypeAppeal()
        {
            var repos       = new TypeAppealRepository(_context);
            var typesAppeal = await repos.GetEntities();

            return(Ok(typesAppeal));
        }
Exemplo n.º 3
0
        public void AddTypeAppealTest()
        {
            var type = new TypeAppeal()
            {
                Name = "TestType",
                Note = "Type create only test"
            };
            var repos = new TypeAppealRepository(new AppDbContext());

            repos.Add(type);
            repos.Delete(type);

            Assert.Pass();
        }