public async Task <int> AddNewTemplate([FromBody] Template obj)
 {
     try
     {
         string appPath = _hostingEnvironment.WebRootPath;
         DynamicComponentController controller = new DynamicComponentController();
         return(await controller.AddNewTemplate(obj, appPath, GetSiteID, GetUsername));
     }
     catch (Exception ex)
     {
         ProcessException(ex);
         return(0);
     }
 }