Skip to content

Commit

Permalink
update mapping for message queue model
Browse files Browse the repository at this point in the history
  • Loading branch information
meofiscoding committed Nov 20, 2023
1 parent 063fef9 commit cd9e704
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ namespace EventBus.Message.Events
{
public class IntegrationEvent
{
public Guid Id { get; private set; }
public Guid Id { get; } = Guid.NewGuid();

public DateTime CreationDate { get; } = DateTime.UtcNow;

public DateTime CreationDate { get; private set; }
public IntegrationEvent()
{
Id = Guid.NewGuid();
CreationDate = DateTime.UtcNow;

}

public IntegrationEvent(Guid id, DateTime creationDate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ public class MovieProfile : Profile
{
public MovieProfile()
{
CreateMap<MovieInformation, TransferMovieListEvent>()
// auto map all properties except the CountWatched property
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
CreateMap<MovieInformation, TransferMovieListEvent>().ReverseMap();
}
}
}

0 comments on commit cd9e704

Please sign in to comment.