public void Create(AnimeId oId, AnimeName oName, StudioId oStudioId) { var oAnime = Anime.Create(oId, oName, oStudioId); _oAnimeRepository.Save(oAnime); //TODO: publish events here }
public static Anime Create(AnimeId oId, AnimeName oName, StudioId oStudioId) { var oAnime = new Anime(oId, oName, oStudioId); //TODO: implement event sourcing here return(oAnime); }
public Task <Unit> Handle(AnimeCreateCommand request, CancellationToken cancellationToken) { var id = new AnimeId(Guid.Parse(request.AnimeId)); var name = new AnimeName(request.AnimeName); var studioId = new StudioId(Guid.Parse(request.StudioId)); AnimeCreator.Create(id, name, studioId); return(new Task <Unit>(() => Unit.Value)); }
public override string ToString() { return(AnimeId.ToString()); }
public void Delete(AnimeId id) { }
public Anime(AnimeId oId, AnimeName oAnimeName, StudioId oStudioId) { Id = oId; Name = oAnimeName; StudioId = oStudioId; }
public override int GetHashCode() { return(AnimeId.GetHashCode()); }