C# Класс DataAccessLayer.DataBase

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

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

Метод Описание
CreateAccount ( Account account ) : bool
CreateAdmin ( Account account ) : void
CreateComment ( Comment comment ) : bool
CreatePost ( Post post ) : bool
DataBase ( ) : System
DeleteAccount ( string name ) : bool
DeleteComment ( System.Guid comid ) : void
GetAccountById ( System.Guid id ) : Account
GetAccountByLogin ( string username, bool checkExisting ) : Account
GetAllAccounts ( ) : IEnumerable
GetAllPosts ( ) : List
GetAllRoles ( ) : string[]
GetComents ( System.Guid postId ) : List
GetIdByName ( string login ) : System.Guid
GetLikedByUser ( string modelName ) : IEnumerable
GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
GetPost ( System.Guid postId ) : Post
GetRolesOfAccounts ( ) : string[]>.Dictionary
NameById ( System.Guid accountId ) : string
RegisterRoles ( ) : int
SetLike ( System.Guid postId, System.Guid accountId ) : bool
UpdateAvatar ( System.Guid accountId, byte Image, string mimeType ) : bool
UpdateCityAndCountry ( System.Guid id, string newCity, string newCountry ) : bool
UpdateMail ( System.Guid id, string newMail ) : bool
UpdateName ( System.Guid id, string newName ) : bool
UpdatePassword ( System.Guid id, string password ) : bool
UpdateRole ( System.Guid accountId, int roleCode ) : bool

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

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

public CreateAccount ( Account account ) : bool
account Entities.Account
Результат bool

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

public CreateAdmin ( Account account ) : void
account Entities.Account
Результат void

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

public CreateComment ( Comment comment ) : bool
comment Entities.Comment
Результат bool

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

public CreatePost ( Post post ) : bool
post Entities.Post
Результат bool

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

public DataBase ( ) : System
Результат System

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

public DeleteAccount ( string name ) : bool
name string
Результат bool

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

public DeleteComment ( System.Guid comid ) : void
comid System.Guid
Результат void

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

public GetAccountById ( System.Guid id ) : Account
id System.Guid
Результат Entities.Account

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

public GetAccountByLogin ( string username, bool checkExisting ) : Account
username string
checkExisting bool
Результат Entities.Account

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

public GetAllAccounts ( ) : IEnumerable
Результат IEnumerable

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

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

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

public GetAllRoles ( ) : string[]
Результат string[]

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

public GetComents ( System.Guid postId ) : List
postId System.Guid
Результат List

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

public GetIdByName ( string login ) : System.Guid
login string
Результат System.Guid

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

public GetLikedByUser ( string modelName ) : IEnumerable
modelName string
Результат IEnumerable

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

public GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
postId System.Guid
accountId System.Guid
Результат int>.Dictionary

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

public GetPost ( System.Guid postId ) : Post
postId System.Guid
Результат Entities.Post

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

public GetRolesOfAccounts ( ) : string[]>.Dictionary
Результат string[]>.Dictionary

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

public NameById ( System.Guid accountId ) : string
accountId System.Guid
Результат string

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

public RegisterRoles ( ) : int
Результат int

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

public SetLike ( System.Guid postId, System.Guid accountId ) : bool
postId System.Guid
accountId System.Guid
Результат bool

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

public UpdateAvatar ( System.Guid accountId, byte Image, string mimeType ) : bool
accountId System.Guid
Image byte
mimeType string
Результат bool

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

public UpdateCityAndCountry ( System.Guid id, string newCity, string newCountry ) : bool
id System.Guid
newCity string
newCountry string
Результат bool

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

public UpdateMail ( System.Guid id, string newMail ) : bool
id System.Guid
newMail string
Результат bool

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

public UpdateName ( System.Guid id, string newName ) : bool
id System.Guid
newName string
Результат bool

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

public UpdatePassword ( System.Guid id, string password ) : bool
id System.Guid
password string
Результат bool

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

public UpdateRole ( System.Guid accountId, int roleCode ) : bool
accountId System.Guid
roleCode int
Результат bool