Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created November 13, 2015 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/b7e1cadfbcc2d7b32f6e to your computer and use it in GitHub Desktop.
Save justinyoo/b7e1cadfbcc2d7b32f6e to your computer and use it in GitHub Desktop.
Event Sourcing & CQRS Pattern for SPA
[RoutePrefix("api/events")]
public class InputValueChangedEventController : ApiController
{
[HttpPost]
[Route("username-changed")]
public virtual async Task<UsernameChangeResponse> SetUsername([FromBody] UsernameChangeRequest request)
{
var response = await this._service.ChangeUsernameAsync(request);
return response;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment