C# Class AspnetApiAndDocumentDB.Data.MovieRepository

Show file Open project: Ninja-Labs/azure

Private Properties

Property Type Description

Public Methods

Method Description
CreateMovie ( Movie entity ) : Task
GetAllMovies ( ) : IEnumerable
GetMovieById ( string id ) : Movie
GetOrCreateCollection ( string databaseLink, string collectionId ) : DocumentCollection
GetOrCreateDatabase ( string databaseId ) : Microsoft.Azure.Documents.Database

Method Details

CreateMovie() public static method

public static CreateMovie ( Movie entity ) : Task
entity AspnetApiAndDocumentDB.Models.Movie
return Task

GetAllMovies() public static method

public static GetAllMovies ( ) : IEnumerable
return IEnumerable

GetMovieById() public static method

public static GetMovieById ( string id ) : Movie
id string
return AspnetApiAndDocumentDB.Models.Movie

GetOrCreateCollection() public static method

public static GetOrCreateCollection ( string databaseLink, string collectionId ) : DocumentCollection
databaseLink string
collectionId string
return DocumentCollection

GetOrCreateDatabase() public static method

public static GetOrCreateDatabase ( string databaseId ) : Microsoft.Azure.Documents.Database
databaseId string
return Microsoft.Azure.Documents.Database