internal CommonRequest Find(int id) { var url = $"{this._apiUrl}/Employees/Find?id={id}"; var json = HttpConnector.Get(url); if (json.State == StateEnum.Success) { return(JsonConvert.DeserializeObject <CommonRequest>(json.Message)); } else { return(json); } }
internal EmployeeCollection Read() { var url = $"{this._apiUrl}/Employees/Read"; var json = HttpConnector.Get(url); if (json.State == StateEnum.Success) { return(JsonConvert.DeserializeObject <EmployeeCollection>(json.Message)); } var error = new EmployeeCollection() { State = StateEnum.Fail, Message = json.Message, }; return(error); }