public IActionResult GetStaffMember(int id, [FromQuery] string fields)
        {
            // check requested fields are valid
            if (!_typeHelperService.TypeHasProperties <StaffMemberDTO>(fields))
            {
                return(BadRequest());
            }

            // get staff member
            var staffMemberFromRepo = _supermarketRepository.GetStaffMemberById(id);

            // check staff member exists
            if (staffMemberFromRepo == null)
            {
                return(NotFound());
            }

            // map and return data
            var staffMember = Mapper.Map <StaffMemberDTO>(staffMemberFromRepo);

            var links = CreateLinksForStaffMember(id, fields);

            var linkedResourceToReturn = staffMember.ShapeData(fields)
                                         as IDictionary <string, object>;

            linkedResourceToReturn.Add("links", links);

            return(Ok(linkedResourceToReturn));
        }