public static Author MapAuthor(Models.Author author) => new Author { Id = GetAuthorId(author), UserName = author.UserName, GivenName = author.GivenName, FamilyName = author.FamilyName, Email = author.Email, Birthdate = author.BirthDate.HasValue ? Timestamp.FromDateTime(author.BirthDate.Value) : null };
public static Author.Types.Id GetAuthorId(Models.Author author) => new Author.Types.Id { Value = (uint)author.Id };