/// <inheritdoc /> public (PostEntity IndexEntity, PostContentEntity ContentEntity) CreatePostEntities( int authorId, PostCreationInfo creationInfoModel) { if (creationInfoModel == null) { throw new ArgumentNullException(nameof(creationInfoModel)); } var contentEntity = PostContentEntity.Create(); contentEntity.Text = creationInfoModel.Text; var indexEntity = PostEntity.Create(authorId, creationInfoModel.RegionId, creationInfoModel.Title, contentEntity.Id.ToByteArray()); return(indexEntity, contentEntity); }