public IHttpActionResult GetAll() { try { BLResources resource = new BLResources(); var resource_list = resource.GetAll(); ResourcesVM obj = new ResourcesVM(); return(Ok(obj.CreateList(resource_list))); } catch (Exception ex) { return(InternalServerError(ex)); } }