namespace IOL.BookmarkThing.Server.Api.V1.Entries; public class CreateEntryRequest { public Uri Url { get; set; } public string Description { get; set; } public string Tags { get; set; } public List GetErrors() { var errors = new List(); if (Url == default) { errors.Add(new ErrorResult("Url is a required field")); } return errors; } public Entry AsDbEntity(Guid userId) { return new Entry { Id = Guid.NewGuid(), UserId = userId, Url = Url, Description = Description, Tags = Tags }; } }