private static async Task InitializeRequestBody(HttpContext context, IVersionMigrationHelper migrationHelper) { var request = context.Request; var requestStream = request.Body; var content = await new StreamReader(requestStream).ReadToEndAsync(); migrationHelper.SetRequestBody(content); }
public void Up(IVersionMigrationHelper migrationHelper) { if (ShouldApply(migrationHelper.GetHttpContext())) { var user = migrationHelper.GetRequestBody <dynamic>(); if (user.userId == null) { user.userId = user.id; } migrationHelper.SetRequestBody(user); } }