Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class OrdersResponseCreator : IResponseCreator
{
public Response CreateResponse()
{
var orderCreatedResponse = new OrderCreatedResponse
{
Message = "Order created.",
OrderId = (uint)new Random().Next(int.MaxValue)
};
return new ResponseBuilder().WithContent(orderCreatedResponse, new JsonContentSerializer())
.WithStatusCode(HttpStatusCode.Created)
.Build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.