Show / Hide Table of Contents

Class Item

Defines the main Scrapbook item or entry.

Inheritance
System.Object
Item
Namespace: Scrapbook101core.Models
Assembly: Scrapbook101core.dll
Syntax
public class Item
Remarks

A Scrapbook Item object when written to the Document DB bcomes a block of JSON-formatted text. Not all properties are required.

Properties

| Improve this Doc View Source

AssetPath

Declaration
public string AssetPath { get; set; }
Property Value
Type Description
System.String

This is the path to any digital assets associated with the item. Example value: "assets/2019/2019-01-01".

Remarks

For example, there might be images, PDFs or other documents that give context about the item. Associating assets is not necessary if you plan to implement Scrapbook101core without any assets. Part of the spirit behind Scrapbook101core however is to provide strong visual cues for remembering an item as well as archiving data associated with it, so at least one image for each Scrapbook101core is recommended.

| Improve this Doc View Source

Assets

Declaration
public List<AssetItem> Assets { get; set; }
Property Value
Type Description
System.Collections.Generic.List<AssetItem>

A list of assets associated with the item. Can be null, meaning no assets are associated with the item.

| Improve this Doc View Source

Category

Declaration
[Required(ErrorMessage = "Category is required.")]
public string Category { get; set; }
Property Value
Type Description
System.String

One of the category values described in the Category class. A Scrapbook101core item must be assigned to a category.

| Improve this Doc View Source

CategoryFields

Declaration
public CategoryFields CategoryFields { get; set; }
Property Value
Type Description
CategoryFields

Fields specific to the category selected for the Scrapbook101core item. See the Category class for more information. Each category has a fixed set of fields.

| Improve this Doc View Source

DateAdded

Declaration
public DateTime DateAdded { get; set; }
Property Value
Type Description
System.DateTime

This value is automatically inserted by code upon initial creation of an item and then never changed. Example: A string that is an ISO 8601 date and time, e.g., "2018-06-07T00:00:00".

| Improve this Doc View Source

DateUpdated

Declaration
public DateTime DateUpdated { get; set; }
Property Value
Type Description
System.DateTime

This value is automatically inserted. Example: A string that is an ISO 8601 date and time, e.g., "2018-06-07T00:00:00".

Remarks

On initial creation of an Scrapbook101core item, this property equals dateAdded. When an item is edited, this property is updated with the correct timestamp.

| Improve this Doc View Source

Description

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

Information about the Scrapbook101core item that isn't already captured in other fields.

Remarks

This property provides the context of why the item is important. Descriptions longer than a couple hundred words should be added as assets.

| Improve this Doc View Source

GeoLocation

Declaration
public Point GeoLocation { get; set; }
Property Value
Type Description
Point

Represents a point geometry class in the Azure Cosmos DB service.

Remarks

A Microsoft.Azure.Documents.Spatial.Point If you have a Bing Maps Key and it is specified in the appsettings.json file, then location values are converted into latitude and longitude coordinates (geocoded) to allow for more flexible location searches.

| Improve this Doc View Source

Id

Declaration
public string Id { get; set; }
Property Value
Type Description
System.String

An auto-generated globally unique identifier (GUID), like "c73af369-7a21-45dd-b9ec-fe31af354fe1".

| Improve this Doc View Source

Location

Declaration
public string Location { get; set; }
Property Value
Type Description
System.String

A friendly name of the location that is relevant for the Scrapbook101core item.

Remarks

It is not required but is helpful. It is important to be consistent with how you enter values to make searching easier. Examples: "Seattle, WA" or "101 Main St. Seattle 98103, USA" or "Italy".

| Improve this Doc View Source

Rating

Declaration
public string Rating { get; set; }
Property Value
Type Description
System.String

A rating of the Scrapbook101core item, if applicable.

Remarks

The rating system will be unique for each implementation. The test data provided with Scrapbook101core uses a rating of 1 - 5.

| Improve this Doc View Source

Title

Declaration
[Required(ErrorMessage = "Title is required.")]
public string Title { get; set; }
Property Value
Type Description
System.String

A descriptive title for the Scrapbook101core item. For example, if item is a book, use all or part of the book title.

| Improve this Doc View Source

Type

Defines the Document DB entry type.

Declaration
[Required(ErrorMessage = "Type is required.")]
public string Type { get; set; }
Property Value
Type Description
System.String
Remarks

The value of the an item type is read from the appsettings.json file. For example, "scrapbook101Item". The type distinguished the item from other Document DB entries like category.

| Improve this Doc View Source

UpdatedBy

Declaration
public string UpdatedBy { get; set; }
Property Value
Type Description
System.String

An identifier representing who changed the entry.

Remarks

This could be a user name or ID. For example, if you implement an authentication scheme based on Windows Live, Facebook, or Google, you can use the user's email or ID in this field.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX for Scrapbook101Core on