public static string getParentInstanceOfBrowse(DataStructureInfo conceptInfo) { if (conceptInfo is BrowseDataStructureInfo) { BrowseDataStructureInfo browseInfo = (BrowseDataStructureInfo)conceptInfo; return("\"" + browseInfo.Source.Module.Name + "." + browseInfo.Source.Name + "\""); } return("null"); }
protected static string RepositoryFunctionsSnippet(BrowseDataStructureInfo info) { return(string.Format( @"public IQueryable<Common.Queryable.{0}_{1}> Compute(IQueryable<Common.Queryable.{2}_{3}> source) {{ return from item in source select new Common.Queryable.{0}_{1} {{ ID = item.ID, Base = item, {4} }}; }} ", info.Module.Name, info.Name, info.Source.Module.Name, info.Source.Name, BrowsePropertiesTag.Evaluate(info))); }
protected static string QuerySnippet(BrowseDataStructureInfo info) { return(string.Format( @"return Compute(_domRepository.{0}.{1}.Query());", info.Source.Module.Name, info.Source.Name)); }