Пример #1
0
 public DownloadDataModel ExecuteDownload_id(TemplateModel request)
 {
     var template = _templates.Get(request.id);
     if (template == null) throw new NotFoundException("Template");
     return new DownloadDataModel(
         Encoding.ASCII.GetBytes(template.Source),
         template.Name + ".tex",
         "text/plain; charset=us-ascii");
 }
Пример #2
0
 public TemplateModel Execute_id(TemplateModel request)
 {
     var template = _templates.Get(request.id);
     if (template == null) throw new NotFoundException("Template");
     return Mapper.Map<TemplateModel>(template);
 }
Пример #3
0
 public void Execute_id(TemplateModel request)
 {
     _templates.Delete(request.id);
 }