Releases: soundaranbu/Razor.Templating.Core
Releases · soundaranbu/Razor.Templating.Core
v2.0.0
v2.0.0-rc.1
What's Changed
- New methods to render if view not exists by @soundaranbu in #66
+ Task<(bool ViewExists, string? RenderedView)> TryRenderAsync(string viewName, object? viewModel = null, Dictionary<string, object>? viewBagOrViewData = null);
+ Task<(bool ViewExists, string? RenderedView)> TryRenderPartialAsync(string viewName, object? viewModel = null, Dictionary<string, object>? viewBagOrViewData = null);
Breaking Change
- Removed deprecated methods announced in the previous releases
// This method can be safely removed and it has no effect
- Initialize()
// Use the non-generic variant instead
- Task<string> RenderAsync<TModel>(string viewName, object viewModel, Dictionary<string, object> viewBagOrViewData)
NuGet
Full Changelog: v1.9.0...v2.0.0-rc.1
v1.9.0
What's Changed
- Added option to RenderPartialAsync when you don't need a layout page … by @mobiletonster in #52
- Do not override IWebHostEnvironment when it's already present #58
New Contributors
- @mobiletonster made their first contribution in #52
NuGet
Full Changelog: v1.8.0...v1.9.0
v.1.9.0-rc.2
What's Changed
- #58 Do not override
IWebHostEnvironment
when it's already present - Full Changelog: v1.9.0-rc.1...v.1.9.0-rc.2
NuGet
v.1.9.0-rc.1
What's Changed
- Added method
RenderPartialAsync
when you don't need a layout page … by @mobiletonster in #52
New Contributors
- @mobiletonster made their first contribution in #52
Full Changelog: v1.8.0...v1.9.0-rc.1
NuGet
v1.8.0
What's Changed
- All changes described in https://github.com/soundaranbu/Razor.Templating.Core/releases/tag/v1.8.0-rc.1
New Contributors
Full Changelog: v1.7.1...v1.8.0
NuGet Package
v1.8.0-rc.1
NuGet
- This version is published in NuGet as prerelease https://www.nuget.org/packages/Razor.Templating.Core/1.8.0-rc.1
What's Changed
- Add
IRazorTemplateEngine
interface & allow dependency injection through constructor by @pbolduc in #48
public interface IRazorTemplateEngine
{
/// <summary>
/// Renders View(.cshtml) To String
/// </summary>
/// <param name="viewName">Relative path of the .cshtml view. Eg: /Views/YourView.cshtml or ~/Views/YourView.cshtml</param>
/// <param name="viewModel">Optional model data</param>
/// <param name="viewBagOrViewData">Optional view bag or view data</param>
/// <returns></returns>
Task<string> RenderAsync(string viewName, object? viewModel = null, Dictionary<string, object>? viewBagOrViewData = null);
}
- #46 Fixed issue with thread safely by @pbolduc in #48
- #25 Fixed issue with DI in Blazor Server project by @pbolduc in #48
- #39 Reduced 3 APIs into 1 API. ViewModel, ViewBagOrViewData are now optional params by @pbolduc in #48
Task<string> RenderAsync(string viewName, object? viewModel = null, Dictionary<string, object>? viewBagOrViewData = null);
What's Obsolete
RazorTemplateEngine.Initialize()
is not used anymore and hence is marked as obsolete. Users can safely remove it. This method will be removed in v2.0.0- The
RenderAsync
method with generic type is not used anymore. Users will need to use the alternateRenderAsync
method without a generic type param. This API with generic type param will be removed in v2.0.0
//before
var html = await RazorTemplateEngine.RenderAsync<object>("~/Index.cshtml", null, viewData);
//after
var html = await RazorTemplateEngine.RenderAsync("~/Index.cshtml", null, viewData);
New Contributors
Full Changelog: v1.7.1...v1.8.0-rc.1
v1.7.1
What's Changed
- Template engine loads assemblies multiple times and breaks resolution of XAML resources by @dirvo in #37
- Added sample to send emails with razor templating by @soundaranbu in #43
- Improved documentation in README.md
- Tests cases are now aligned with
v1.6.x
- Published NuGet Package https://www.nuget.org/packages/Razor.Templating.Core/1.7.1
New Contributors
Full Changelog: v1.7.0...v1.7.1
v1.7.1-rc.1
- Released nuget package v1.7.1-rc.1
What's Changed
- Template engine loads assemblies multiple times and breaks resolution of XAML resources by @dirvo in #37
New Contributors
Full Changelog: v1.7.0...v1.7.1-rc.1
v1.6.1-rc.1
Changes:
- Fixed form action not rendering with tag helpers asp-controller, asp-action #35
- Published nuget package https://www.nuget.org/packages/Razor.Templating.Core/1.6.1-rc.1
Note:
- This pre-release only supports upto .NET 5. Pre-release for 1.7.x which is for .NET 6 will be released later.
Full Changelog: v1.6.0...v1.6.1-rc.1