C# Класс Sample.UserRepository

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
UserContext CloudTableContext

Открытые методы

Метод Описание
GetAllUsers ( ) : List
GetAllVersions ( User givenUser ) : IEnumerable
GetUsersByFirstName ( string firstName ) : IEnumerable
GetUsersByTypeOfUser ( string userType ) : List
GetUsersThatLiveInFlorida ( ) : List
Save ( User user ) : void
UserRepository ( ) : System.Collections.Generic

Приватные методы

Метод Описание
InitPartitionSchemas ( ) : void

The partition schemas are how your domain object gets sorted/categorized/grouped inside Azure Table storage. You create them in your client code and then "add" them to the CloudTableContext class that you're using to interact with the Table (in this case _userContext). Remember, these are just schema definitions for one particular PartitionKey. There is a DefaultSchema that get set on the CloudTableContext class automatically (in this case _userContext) which sets the PartitionKey to be the name of the object Type and the RowKey based on the Id property of the object provided during intialization.

Описание методов

GetAllUsers() публичный Метод

public GetAllUsers ( ) : List
Результат List

GetAllVersions() публичный Метод

public GetAllVersions ( User givenUser ) : IEnumerable
givenUser User
Результат IEnumerable

GetUsersByFirstName() публичный Метод

public GetUsersByFirstName ( string firstName ) : IEnumerable
firstName string
Результат IEnumerable

GetUsersByTypeOfUser() публичный Метод

public GetUsersByTypeOfUser ( string userType ) : List
userType string
Результат List

GetUsersThatLiveInFlorida() публичный Метод

public GetUsersThatLiveInFlorida ( ) : List
Результат List

Save() публичный Метод

public Save ( User user ) : void
user User
Результат void

UserRepository() публичный Метод

public UserRepository ( ) : System.Collections.Generic
Результат System.Collections.Generic

Описание свойств

UserContext публичное свойство

public CloudTableContext UserContext
Результат CloudTableContext