public async Task <bool> DeleteAsyncById(int id) { //Fazer validações se o user esta no padrão certo; var service = new ServicePerfil(); bool result = await service.DeleteAsyncById(id); return(result); }
public async Task <bool> EditAsync(PerfilView dados) { //Fazer validações se o user esta no padrão certo; var service = new ServicePerfil(); bool result = await service.EditAsync(dados); return(result); }
public async Task <string> GetAllAsync() { var service = new ServicePerfil(); var jsonstring = await service.GetAllAsync(); if (jsonstring == "[]") { return("Null"); } else { return(jsonstring); } }
public async Task <string> GetByIdAsync(int id) { //Fazer validações se o user esta no padrão certo; var service = new ServicePerfil(); var jsonstring = await service.GetByIdAsync(id); if (jsonstring == "[]") { return("Null"); } else { return(jsonstring); } }
//Falta inyectar el servicio atraves de un conteiner public PerfilController() { _service = new ServicePerfil(); }