コード例 #1
0
 public HttpResponseMessage Get(string id)
 {
     try
     {
         var result = context.Get(id);
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception e)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, e.Message));
     }
 }
コード例 #2
0
 public SingleResult <SYS_Role> GetSYS_Role([FromODataUri] string key, ODataQueryOptions <SYS_Role> queryOptions)
 {
     return(SingleResult.Create(db.Get(key)));
 }
コード例 #3
0
 /// <summary>
 /// </summary>
 /// <param name="rolesId"></param>
 /// <returns></returns>
 public Sys_Roles Get(int rolesId)
 {
     return(_roleDB.Get(rolesId));
 }