• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / MediatR.CommandQuery / 12567339125

01 Jan 2025 04:52AM UTC coverage: 60.229% (-0.1%) from 60.328%
12567339125

push

github

pwelter34
switch to Testcontainers

402 of 761 branches covered (52.83%)

Branch coverage included in aggregate %.

1282 of 2035 relevant lines covered (63.0%)

19.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/MediatR.CommandQuery/Commands/EntityCreateCommand.cs
1
using System.Diagnostics.CodeAnalysis;
2
using System.Security.Claims;
3

4
using MediatR.CommandQuery.Definitions;
5
using MediatR.CommandQuery.Services;
6

7
namespace MediatR.CommandQuery.Commands;
8

9
/// <summary>
10
/// A command to create a new entity based on the specified <typeparamref name="TCreateModel"/>.
11
/// <typeparamref name="TReadModel"/> will be the result of the command.
12
/// </summary>
13
/// <typeparam name="TCreateModel">The type of the create model.</typeparam>
14
/// <typeparam name="TReadModel">The type of the read model.</typeparam>
15
public record EntityCreateCommand<TCreateModel, TReadModel>
16
    : EntityModelCommand<TCreateModel, TReadModel>, ICacheExpire
17
{
18
    /// <summary>
19
    /// Initializes a new instance of the <see cref="EntityCreateCommand{TCreateModel, TReadModel}"/> class.
20
    /// </summary>
21
    /// <param name="principal">the <see cref="ClaimsPrincipal"/> this command is run for</param>
22
    /// <param name="model">The create model for this command.</param>
23
    public EntityCreateCommand(ClaimsPrincipal? principal, [NotNull] TCreateModel model)
24
        : base(principal, model)
32✔
25
    {
26
    }
30✔
27

28
    /// <inheritdoc />
29
    string? ICacheExpire.GetCacheTag()
30
        => CacheTagger.GetTag<TReadModel>();
×
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc