/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { this.Write("using BWF.DataServices.Metadata.Interfaces;\r\nusing System;\r\n\r\nnamespace "); #line 12 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.GetNamespace())); #line default #line hidden this.Write("."); #line 12 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.Name)); #line default #line hidden this.Write(".Domain\r\n{\r\n"); #line 14 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" if (CurrentObject.SupportsIHaveId()) { #line default #line hidden this.Write(" \r\n public class "); #line 15 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(" : IHaveId<"); #line 15 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.GetKeyType())); #line default #line hidden this.Write(">\r\n"); #line 16 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" } else { #line default #line hidden this.Write("\tpublic class "); #line 17 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("\r\n"); #line 18 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" } #line default #line hidden this.Write(" {\r\n"); #line 20 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" foreach (var property in CurrentObject.Properties) { #line default #line hidden this.Write(" public virtual "); #line 21 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyType.ToCSharpType())); #line default #line hidden this.Write(" "); #line 21 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.PropertyName)); #line default #line hidden this.Write(" { get; set; }\r\n"); #line 22 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.Domain\Models\ModelTemplate.tt" } #line default #line hidden this.Write(" }\r\n}"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { this.Write("using AutoMapper;\r\n"); #line 10 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" if (!CurrentObject.SupportsIHaveId()) { #line default #line hidden this.Write("using BWF.DataServices.Core.Abstract;\r\n"); #line 12 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" } else { #line default #line hidden this.Write("using BWF.DataServices.Support.NHibernate.Abstract;\r\n"); #line 14 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" } #line default #line hidden this.Write("using BWF.DataServices.Metadata.Attributes.Actions;\r\nusing "); #line 16 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.GetNamespace())); #line default #line hidden this.Write("."); #line 16 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.Name)); #line default #line hidden this.Write(".Domain;\r\n\r\nnamespace "); #line 18 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.GetNamespace())); #line default #line hidden this.Write("."); #line 18 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.Name)); #line default #line hidden this.Write(".DataService\r\n{\r\n\t[ViewAction(\""); #line 20 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.DisplayName)); #line default #line hidden this.Write("\")]\r\n"); #line 21 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" if (CurrentObject.SupportsIHaveId()) { #line default #line hidden this.Write(" [CreateAction(\""); #line 22 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.DisplayName)); #line default #line hidden this.Write("\")]\r\n [EditAction(\""); #line 23 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.DisplayName)); #line default #line hidden this.Write("\")]\r\n [DeleteAction(\""); #line 24 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.DisplayName)); #line default #line hidden this.Write("\")]\r\n"); #line 25 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" } #line default #line hidden #line 26 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" if (CurrentObject.SupportsIHaveId()) { #line default #line hidden this.Write(" public class "); #line 27 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("RecordType : ChangeableRecordType<"); #line 27 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(", "); #line 27 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.GetKeyType())); #line default #line hidden this.Write(", "); #line 27 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("BatchValidator>\r\n"); #line 28 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" } else { #line default #line hidden this.Write("\tpublic class "); #line 29 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("RecordType : RecordType<"); #line 29 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(", "); #line 29 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(">\r\n"); #line 30 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" } #line default #line hidden this.Write(" {\r\n public override void ConfigureMapper()\r\n {\r\n Map" + "per.CreateMap<"); #line 34 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(", "); #line 34 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\RecordTypes\RecordTypeTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(">(); \r\n }\r\n }\r\n}\r\n"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { this.Write("using BWF.DataServices.Core.Concrete.ChangeSets;\r\nusing BWF.DataServices.Support." + "NHibernate.Abstract;\r\nusing BWF.DataServices.Support.NHibernate.Validators;\r\nusi" + "ng "); #line 12 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.GetNamespace())); #line default #line hidden this.Write("."); #line 12 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.Name)); #line default #line hidden this.Write(".Domain;\r\n\r\nnamespace "); #line 14 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.GetNamespace())); #line default #line hidden this.Write("."); #line 14 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DomainDataService.Name)); #line default #line hidden this.Write(".DataService\r\n{\r\n public class "); #line 16 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("BatchValidator : BatchValidator<"); #line 16 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.GetKeyType())); #line default #line hidden this.Write(", "); #line 16 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write(">\r\n {\r\n protected override void SetupValidators(ChangeSetItems<"); #line 18 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.GetKeyType())); #line default #line hidden this.Write(", "); #line 18 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("> items)\r\n {\r\n validator = new "); #line 20 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("Validator();\r\n deletionValidator = new "); #line 21 "C:\git\stuff\DataServiceDesigner\DataServiceDesigner.Templating\Templates\Template.DataService\Validators\Model\BatchValidatorTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(CurrentObject.ObjectName)); #line default #line hidden this.Write("DeleteValidator();\r\n }\r\n }\r\n}"); return(this.GenerationEnvironment.ToString()); }