Пример #1
0
 /// <summary>
 /// GET api/users
 /// </summary>
 /// <returns>All users and http status code</returns>
 public HttpResponseMessage Get()
 {
     return(new HttpResponseMessage()
     {
         Content = new StringContent(_jsonHelper.GetDataStringFromJsonFile(_filePathService.GetUsersDataJsonFilePath()),
                                     Encoding.UTF8, "application/json"),
         StatusCode = HttpStatusCode.OK
     });
 }
Пример #2
0
 /// <summary>
 /// Deserialize Json into a all users list
 /// </summary>
 /// <returns>A list of all users from the root level</returns>
 public AllUsersRootModel GetUserListRootObject()
 {
     return(JsonConvert.DeserializeObject <AllUsersRootModel>(_jsonHelper.GetDataStringFromJsonFile(_filePathService.GetUsersDataJsonFilePath())));
 }