using PCUT.Entities; using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Threading.Tasks; namespace PCUT.API.Managers { public class UserManager: ManagerBase, IUserManager { string path = "users"; public async Task CreateAsync(User entity) { try { return await ApiClient.CreateAsync(path, entity); } catch { return null; } } public async Task DeleteAsync(int id) { try { return await ApiClient.DeleteAsync(path, id); } catch { return false; } } public async Task> GetAllAsync() { try { return await ApiClient.GetAllAsync(path); } catch { return null; } } public async Task GetByIdAsync(int id) { try { return await ApiClient.GetByIdAsync(path, id); } catch { return null; } } public async Task UpdateAsync(int id, User entity) { try { return await ApiClient.UpdateAsync(path, id, entity); } catch { return null; } } } }