Skip to content
Discussion options

You must be logged in to vote

IRuleContext has access to the ApplicationContext. You can therefore do something like this:

protected override async Task ExecuteAsync(Csla.Rules.IRuleContext context) 
{
	var portal = context.ApplicationContext.GetRequiredService<IDataPortal<GetOrganizationSettingCommand>>();
	var cmd = portal.Create();
	cmd.OrganizationKey = orgKey;
	cmd.Name = "IgnoreHireDateOnUpload";
	cmd = await portal.ExecuteAsync(cmd);
	//Check if organization has ignore hire date enabled........
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarkOverstreet
Comment options

Answer selected by MarkOverstreet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants