Advertisement
afterlife88

фів

Sep 21st, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1.       /// <summary>
  2.         /// Get concrete config by key parametr
  3.         /// </summary>
  4.         /// <param name="id">name of configuration</param>
  5.         /// <param name="key">parametr key</param>
  6.         /// <returns></returns>
  7.         [Route("api/configuration/{id}/{key}")]
  8.         public IHttpActionResult Get(string id, string key)
  9.         {
  10.             try
  11.             {
  12.                 var getname = _service.Repository.GetByKey(id, key);
  13.                 if (getname != null)
  14.                     return Ok(getname);
  15.                 return NotFound();
  16.             }
  17.             catch (Exception e)
  18.             {
  19.                 return InternalServerError(e);
  20.             }
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement