Նկարագիր

Համարժեքը 4x-ում՝ AsKernel.ExistsTemplate

Դաս՝ TemplateService

public Task<bool> ExistsTemplate(string name, 
                                 string type)

Ստուգում է տպելու ձևանմուշի նկարագրության առկայությունը տվյալների պահոցի TEMPLATES աղյուսակում։

Պարամետրեր

Օրինակ

// templateNameType  =>  "AgrState\7"

var (_, templateName, templateType) = TemplateService.GetTemplateNameAndType(templateNameType);
if (!await templateService.ExistsTemplate(templateName, templateType))
{
  throw new RESTException(string.Format("'{0}' անունով և '{1}' տիպով ձևանմուշ գոյություն չունի".ToArmenianANSI(), templateName, templateType));
}