Recommended way to do integration
See original GitHub issueIt seems that I am going in circles, first I thought I would use the headless/rest API but then after thinking about it further it seems maybe not the right approach.
I want to achieve the following:
- Central place to add/edit/manage pages/sites
- Have multiple .NET Core sites consume this data
Steps
- Create a Piranha CMS with Manager using SQL Server, and ASP.NET Identity (using for satisfied step 1 above), will refer to this site as
MyCore
- Add a site (default site at this point) called
MyCoreSite
Approach 1: Integration
- Start a new .NET Core Razor Project -
MyConsumer
- Add
Piranha.AspNetCore
nuget package toMyConsumer
- Add stuff to
startup.cs
(not really sure how much stuff is needed given this is only a consumer) - Point the EF to same database as
MyCore
- Add all copy/paste
\Pages\DsiplayTemplates
fromMyCore
toMyConsumer
- Add a razor page to
MyConsumer
that hasIApi
injected - Get pages using the Api based on which page I want
- Render the pages
Approach 2: Headless/REST
- Start a new .NET Core Razor Project -
MyConsumer
- Add
Piranha.WebApi
toMyCore
so enabling headless calls, call.UseApi
- Add
Piranha.AspNetCore
nuget package toMyConsumer
, this is done so de-serialization of REST is made easy, otherwise I would have to create custom classes that match the result of the REST Calls - Start making calls to
MyCore
using REST, render pages which requires a lot of manual work as a lot of stuff is not available that makes it easy to render pages (I assume).
It seems that integration is the way to go but I am not entirely sure.
I wish there was an example of both of these scenarios provided so it is 100% clear on what is required for both scenarios. I am sure a lot of people would find it useful.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
8.5 Integration Strategies‣ Chapter 8 Techniques ...
(a) Simplify the integrand, if possible. ; (b) See if a “simple” substitution will work. ; (c) Identify the type of integral. ;...
Read more >Calculus II - Integration Strategy
Simplify the integrand, if possible. This step is very important in the integration process. · See if a “simple” substitution will work.
Read more >8. Techniques of Integration
1. Substitution · 2. Powers of sine and cosine · 3. Trigonometric Substitutions · 4. Integration by Parts · 5. Rational Functions ·...
Read more >What's the best way to tell which integration method I ...
The answer for what to do in class is to be able to quickly try a method and identify that it will or...
Read more >Best way to solve an integral using Integration by parts.
The easiest/quickest way in my opinion to do integration by parts is something called the D-I method. Would highly recommend using it.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dinukasal If you can’t resolve
IApi
orIDb
you haven’t calledservices.AddPiranha(..)
in yourConfigureServices
. Take a look at this page for documentation, or the entireBasics
section if you’re new to Piranha. https://piranhacms.org/docs/basics/application-setupBest regards
@dinukasal Did you ever get this resolved ?