Giter Site home page Giter Site logo

mattjcowan / llblgenpro_ss_api_razor_templates Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 14.0 18.48 MB

A set of LLBLGen Pro templates to generate a fully RESTful ServiceStack API and HTML interface to manage domain entities.

C# 64.98% CSS 0.34% JavaScript 16.82% Batchfile 0.02% PLpgSQL 17.63% HTML 0.21%

llblgenpro_ss_api_razor_templates's People

Contributors

mattjcowan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

llblgenpro_ss_api_razor_templates's Issues

Tables with Schemas having problems in v4 templates

Matt, first I would like to thank you for such great templates. They are extremely helpful.

I'm having a problem with tables (entities) that are a part of a schema are not having their schema prefix persisted to the DB call.

I have an adventureworks table where the customers table belongs to a schema other than dbo. When I use the entity browser and navigate to the customer entitiy page, no records are returned. I traced the result back to the fact that the schema is not being carried to the call to the database. The final query sent to the DB is "SELECT COUNT(*) AS [LPAV_] FROM [Customer]", and results in a SQL "Invalid object name 'Customer'. I was able to verify the remedy by inserting a synonym for the table to map my schema to the schema of dbo.

Thanks again for this wonderful project.

LLBLgen 'Unique constraints' not handled well

Error in regard to template ss_svc_EntityService.lpt
at line 278: foreach(var ucFieldName in uc.FieldsAsString.Split(',')
This line fails if there is a unique constraint defined in LLBLgen.
Exception type: InvalidOperationException: Sequence contains no matching element

LLBLGen Pro version 4.1. Build November 14th, 2013
-----[Core exception]--------------------
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at MJC_SS_Svc_EntityServiceTemplate.__ScriptCode()
at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutputToFile[TElement](TElement currentElement, String destinationFilename, Boolean failWhenExistent, Assembly compiledTemplatesAssembly, String templateID, Dictionary2 parameters, Boolean isPartOfSet, String outputDescription) at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutputForElements[TElement](String destinationFolderFormat, String filenameFormat, Boolean failWhenExistent, String templateID, Assembly compiledTemplatesAssembly, Dictionary2 parameters, ICollection1 elementsToTraverse, EmitType emitTypeUsed, Func2 nameProducerFunc, Func2 fullNameProducerFunc, Func2 elementTypeNameProducerFunc, Func2 groupNameProducerFunc) at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutput(Dictionary2 parameters, String destinationFolderFormat, String templateID, Assembly compiledTemplatesAssembly, EmitType emitTypeToPerform, String filenameFormat, Boolean failWhenExistent)
at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.Perform(IGenerator executingGenerator, ITask taskDefinition, Dictionary2 parameters) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.Task.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.GeneratorCore.Generator.RunTasks(String rootNameSpaceToUse, String destinationRootFolder, String groupName) at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, ApplicationConfiguration configurationSettings, Language languageToUse, Platform platformToUse, List1 templateBindingsToUse, String templateGroupToUse, String rootNameSpaceToUse, String destinationRootFolder, Project projectDefinition, CodeGenerationCycleOutputType outputType)
at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, CodeGenerationCyclePreferences preferences, ApplicationConfiguration configurationSettings, Project projectDefinition)
at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRunCodeGenerationCycleAction(ITaskGroup toExecute, CodeGenerationCyclePreferences codeGenerationCyclePreferences, HashSet1 entitiesToUse, HashSet1 spCallsToUse, HashSet1 typedViewsToUse, HashSet1 typedListsToUse, HashSet1 valueTypesToUse, HashSet1 tvfCallsTouse, List`1 vsNetProjectsCreated, LogNode& tasksResultLog)

LLBLgen 'ReadOnly' fields not handled well

If there is a field in LLBLgen that has been marked 'ReadOnly' then the generated code won't compile. This is because in template ss_svcimpl_EntityServiceRepository.lpt the code block at line 457 public static <%=entity.Name%>Entity FromDto(this <%=entity.Name%> dto) will generate a line to set a ReadOnly field.

Spaces in include statements

When you build an Include statement – as in { Include = "category,supplier,orderdetails" })
If the developer doesn’t pay attention and puts a space after the comma, anything after comma wont load and no error will get thrown.

Pluralization error

When trying to generate the Northwind code I get an error:

Exception type: NotImplementedException
The culture 'Dutch (Belgium)' is not supported. Pluralization is currently only supported for the English language.
Details:
LLBLGen Pro version 4.1. Build November 14th, 2013
-----[Core exception]--------------------
at System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(CultureInfo culture)
at MJC_SS_V4_Svc_EntityGenericServiceTemplate.Pluralize(String text)
at MJC_SS_V4_Svc_EntityGenericServiceTemplate.__ScriptCode()
at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutputToFile[TElement](TElement currentElement, String destinationFilename, Boolean failWhenExistent, Assembly compiledTemplatesAssembly, String templateID, Dictionary2 parameters, Boolean isPartOfSet, String outputDescription) at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutput(Dictionary2 parameters, String destinationFolderFormat, String templateID, Assembly compiledTemplatesAssembly, EmitType emitTypeToPerform, String filenameFormat, Boolean failWhenExistent)
at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.Perform(IGenerator executingGenerator, ITask taskDefinition, Dictionary2 parameters) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.Task.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.GeneratorCore.Generator.RunTasks(String rootNameSpaceToUse, String destinationRootFolder, String groupName) at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, ApplicationConfiguration configurationSettings, Language languageToUse, Platform platformToUse, List1 templateBindingsToUse, String templateGroupToUse, String rootNameSpaceToUse, String destinationRootFolder, Project projectDefinition, CodeGenerationCycleOutputType outputType)
at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, CodeGenerationCyclePreferences preferences, ApplicationConfiguration configurationSettings, Project projectDefinition)

at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRunCodeGenerationCycleAction(ITaskGroup toExecute, CodeGenerationCyclePreferences codeGenerationCyclePreferences, HashSet1 entitiesToUse, HashSet1 spCallsToUse, HashSet1 typedViewsToUse, HashSet1 typedListsToUse, HashSet1 valueTypesToUse, HashSet1 tvfCallsTouse, List`1 vsNetProjectsCreated, LogNode& tasksResultLog)

It is caused by these two lines in your templates:
System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Singularize(text);
and
System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(System.Globalization.CultureInfo.CurrentCulture).Pluralize(text);

To fix it I changed System.Globalization.CultureInfo.CurrentCulture into
new System.Globalization.CultureInfo("en-US")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.