/// <summary> /// Adds a new note to storage. will return an id for the note. /// </summary> /// <returns></returns> public CreateResponse Create(Note note) { note.Id = IdProvider.New(); note.Created = DateTime.UtcNow; note.Expiry = note.Expiry > DateTime.MinValue ? note.Expiry : DateTime.UtcNow.AddHours(1); return(new CreateResponse { Id = note.Id, Success = Storage.Add(note), Expiry = note.Expiry }); }