TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
210 stars 53 forks source link

Nuget Package Missing #5

Closed noufionline closed 6 years ago

noufionline commented 6 years ago

Hi Tony,

Good Morning!

Thanks for your fantastic efforts. You indeed helped developers like us to be more productive and efficient.

I was trying the new scaffolding mechanism this morning, but unfortunately, the nuget file is missing

EntityFrameworkCore.Scaffolding.Handlebars -Pre

Just wanted to let you know.

Thanks.

tonysneed commented 6 years ago

It’s not quite done yet. :) NuGet doesn’t support adding content (like code templates) with the new project system used with .NET Core, so I have to put some code in the project that copies the template files to the target project if they don’t already exist.

I’m also going to ask the EF Core team to make the discovery of the extension easier, so you don’t need a class that implements IDesignTimeServices.

Stay tuned for the NuGet package a bit later on today or tomorrow ...

tonysneed commented 6 years ago

The NuGet package has not been published. See the updated project README for instructions. Enjoy!

noufionline commented 6 years ago

Thanks. But it's not available yet in nuget.

tonysneed commented 6 years ago

Ah, forgot to hit submit. It's there now. Let me know what you think about it.

noufionline commented 6 years ago

Great Work. It would be really nice if you can extend this to add all the templates required to create a full fledged asp.net core web api with trackable entities.

Hats off to your wonderful work!

tonysneed commented 6 years ago

Thanks for the kudos!

For the ASPNET templating you can use the dotnet new command.

Thanks, Tony

noufionline commented 6 years ago

You mean there is another special template for Asp.Net core with trackable entities you mean. or you are referring the standard dotnet new?

tonysneed commented 6 years ago

Oh I see, you meant a web api template for trackable entities. I was referring to the standard dotnet new, but that doesn’t give any TE stuff.

I have awesome templates for classic TE, but they took a lot of time to create and maintain. That said, it might be interesting to implement a scaffolder for ASPNET Core controllers that uses Handlebars. I’ll look into that.

tonysneed commented 6 years ago

@noufionline There is a way to customize the built-in template for generating Web API controllers. See this SO post for how to do it.

tonysneed commented 6 years ago

PS. I tried it, and this technique works. However, I plan to go ahead and create a NuGet package that provides razor templates that can be customized.

noufionline commented 6 years ago

Thanks, Tony,

That's a good news.

Waiting for your new templates.

tonysneed commented 6 years ago

It'd done: https://www.nuget.org/packages/AspNetCore.WebApi.Templates. Enjoy!