public TemplateLogManageModel(Template template) { TemplateId = template.Id; Name = template.Name; Content = template.Content; DataType = template.DataType; }
public TemplateRenderModel(Template template) { Id = template.Id; Name = template.Name; CacheName = TemplateServices.GetTemplateCacheName(template.Name, template.Created, template.Updated); Content = template.Content; }
/// <summary> /// Initialize template and required data /// </summary> public void Initialize() { if (_templateServices.GetTemplateByName(DefaultTemplate) == null) { var template = new Template { Name = DefaultTemplate, DataType = typeof(List<ServiceCurlyBracket>).AssemblyQualifiedName, CurlyBracket = "{Services}", Content = string.Empty, IsDefaultTemplate = true }; _templateServices.Insert(template); } }
public ResponseModel Delete(Template template) { return _templateRepository.Delete(template); }
public ResponseModel Update(Template template) { return _templateRepository.Update(template); }
public ResponseModel Insert(Template template) { return _templateRepository.Insert(template); }