You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2024. It is now read-only.
public record ViewResultDto<TView, TModel> : SuccessDto<TView> where TView : View<TModel> where TModel : IModel {
public override TView Result
=> base.Result;
/// <summary>
/// Make a successful reply dto from a model.
/// </summary>
public ViewResultDto(TModel from) {
try {
Result = (TView)Activator.CreateInstance(typeof(TView), from);
} catch(Exception ex) {
throw new MissingMethodException($"Could not find constructor for View type: {typeof(TView).FullName}, with a single parameter of Model type: {typeof(IModel).FullName}", ex);