Created
December 8, 2019 09:51
-
-
Save mortezadalil/92c7d33259e7cea4d5127386e0ef4fa4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Cms.Core.IUseCases; | |
namespace Cms.Api.Presenters | |
{ | |
public class PostApiPresenter<T> : IOutputPort<T> | |
{ | |
public JsonContentResult ContentResult { get; } | |
public PostApiPresenter() | |
{ | |
ContentResult = new JsonContentResult(); | |
} | |
public void Handle(T response) | |
{ | |
ContentResult.Content = ContentResult.Serialize(response); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment