Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code gen doesn't generate action when EventSubject is set #89

Closed
Nathan-Priebe opened this issue Nov 23, 2020 · 2 comments
Closed

Code gen doesn't generate action when EventSubject is set #89

Nathan-Priebe opened this issue Nov 23, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Nathan-Priebe
Copy link

Code Gen Code

<Operation Name="Delete" OperationType="Delete" UniqueKey="true" AutoImplement="None" WebApiRoute="{id}" WebApiStatus="Accepted" EventSubject="Reservation">
      <Parameter Name="Id" Type="Guid" IsMandatory="true" />
</Operation>

Generates the following datasvc

public Task DeleteAsync(Guid id)
 {
        return DataSvcInvoker.Current.InvokeAsync(this, async () =>
        {
            await _data.DeleteAsync(id).ConfigureAwait(false);
            await _evtPub.PublishAsync($"Reservation", "", id).ConfigureAwait(false);
            _cache.Remove<Reservation>(new UniqueKey(id));
        });
}

The action string is empty, this only happens when the EventSubject property is set. If the EventSubject is not present, it will set the action to the value of WebApiOperationType or OperationType as expected.

The above code gen did work with previous versions of beef.

Beef Version: V4.1.4

chullybun added a commit that referenced this issue Nov 24, 2020
@chullybun chullybun added the bug Something isn't working label Nov 24, 2020
@chullybun
Copy link
Collaborator

Hi @Nathan-Priebe, code-generation has been corrected. See Beef.CodeGen.Core version 4.1.10. Cheers...

chullybun added a commit that referenced this issue Nov 24, 2020
@Nathan-Priebe
Copy link
Author

Thanks @chullybun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants