C# Class GoogleCloudSamples.Models.DatastoreBookStoreExtensionMethods

Afficher le fichier Open project: GoogleCloudPlatform/getting-started-dotnet

Méthodes publiques

Méthode Description
ToBook ( this entity ) : Book

Unpack a book from a datastore entity.

ToEntity ( this book ) : System.Entity

Create a datastore entity with the same values as book.

ToId ( this key ) : long

Make a book id given a datastore key.

ToKey ( this id ) : Key

Make a datastore key given a book's id.

Method Details

ToBook() public static méthode

Unpack a book from a datastore entity.
public static ToBook ( this entity ) : Book
entity this An entity retrieved from datastore.
Résultat Book

ToEntity() public static méthode

Create a datastore entity with the same values as book.
public static ToEntity ( this book ) : System.Entity
book this The book to store in datastore.
Résultat System.Entity

ToId() public static méthode

Make a book id given a datastore key.
public static ToId ( this key ) : long
key this A datastore key
Résultat long

ToKey() public static méthode

Make a datastore key given a book's id.
public static ToKey ( this id ) : Key
id this A book's id.
Résultat Key