public static Book Create(string title, string description, AuthorId authorId, AuthorFullName authorName) { var book = new Book( TypedId.GetNewId <BookId>(), title, description, authorId, authorName); book.AddEvent(new BookCreated((BookId)book.Id, title, description, authorId)); return(book); }
public static LibraryRecord Create(UserRecord user, List <BookRecord> books) { var record = new LibraryRecord(TypedId.GetNewId <LibraryRecordId>(), user, books); return(record); }
public static Author Create(AuthorFullName authorFullName) { var author = new Author(TypedId.GetNewId <AuthorId>(), authorFullName); return(author); }
public static User Create(string name, string surname, string email) { return(new User(TypedId.GetNewId <UserId>(), name, surname, email)); }