C# Class BusinessLogicLayer.Logic

Inheritance: IBusinessLogicLayer
Show file Open project: sstuteam/Gimble

Public Methods

Method Description
CreateAccount ( Account account ) : bool
CreateAdmin ( Account account ) : void
CreateComment ( Comment comment ) : bool
CreatePost ( Post post ) : bool
DeleteAccount ( string name ) : bool
DeleteComment ( System.Guid comid ) : void
Get30DaysPopular ( ) : IEnumerable
Get7DaysPopular ( ) : IEnumerable
GetAccountById ( System.Guid accountId ) : Account
GetAccountByLogin ( string name, bool checking ) : Account
GetAllAccounts ( ) : IEnumerable
GetAllRoles ( ) : string[]
GetAvatar ( string name ) : Photo
GetBookmarks ( string modelName ) : List
GetByTag ( string currentTag ) : IEnumerable
GetComments ( System.Guid postId ) : List
GetIdByName ( string login ) : System.Guid
GetLatestPosts ( ) : IEnumerable
GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
GetPost ( System.Guid postid ) : Post
GetPostsSource ( System.Guid postId ) : Photo
GetRolesOfAccounts ( ) : string[]>.Dictionary
GetSHA256 ( string password ) : string
GetUserById ( System.Guid id ) : Account
GetUsersPosts ( string currentUser ) : IEnumerable
RegisterRoles ( ) : int
SetLike ( System.Guid postId, System.Guid accountId ) : bool
UpdateAvatar ( System.Guid accountId, byte Avatar, 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

Method Details

CreateAccount() public method

public CreateAccount ( Account account ) : bool
account Entities.Account
return bool

CreateAdmin() public method

public CreateAdmin ( Account account ) : void
account Entities.Account
return void

CreateComment() public method

public CreateComment ( Comment comment ) : bool
comment Comment
return bool

CreatePost() public method

public CreatePost ( Post post ) : bool
post Entities.Post
return bool

DeleteAccount() public method

public DeleteAccount ( string name ) : bool
name string
return bool

DeleteComment() public method

public DeleteComment ( System.Guid comid ) : void
comid System.Guid
return void

Get30DaysPopular() public method

public Get30DaysPopular ( ) : IEnumerable
return IEnumerable

Get7DaysPopular() public method

public Get7DaysPopular ( ) : IEnumerable
return IEnumerable

GetAccountById() public method

public GetAccountById ( System.Guid accountId ) : Account
accountId System.Guid
return Entities.Account

GetAccountByLogin() public method

public GetAccountByLogin ( string name, bool checking ) : Account
name string
checking bool
return Entities.Account

GetAllAccounts() public method

public GetAllAccounts ( ) : IEnumerable
return IEnumerable

GetAllRoles() public method

public GetAllRoles ( ) : string[]
return string[]

GetAvatar() public method

public GetAvatar ( string name ) : Photo
name string
return Photo

GetBookmarks() public method

public GetBookmarks ( string modelName ) : List
modelName string
return List

GetByTag() public method

public GetByTag ( string currentTag ) : IEnumerable
currentTag string
return IEnumerable

GetComments() public method

public GetComments ( System.Guid postId ) : List
postId System.Guid
return List

GetIdByName() public method

public GetIdByName ( string login ) : System.Guid
login string
return System.Guid

GetLatestPosts() public method

public GetLatestPosts ( ) : IEnumerable
return IEnumerable

GetLikes() public method

public GetLikes ( System.Guid postId, System.Guid accountId ) : int>.Dictionary
postId System.Guid
accountId System.Guid
return int>.Dictionary

GetPost() public method

public GetPost ( System.Guid postid ) : Post
postid System.Guid
return Entities.Post

GetPostsSource() public method

public GetPostsSource ( System.Guid postId ) : Photo
postId System.Guid
return Photo

GetRolesOfAccounts() public method

public GetRolesOfAccounts ( ) : string[]>.Dictionary
return string[]>.Dictionary

GetSHA256() public method

public GetSHA256 ( string password ) : string
password string
return string

GetUserById() public method

public GetUserById ( System.Guid id ) : Account
id System.Guid
return Entities.Account

GetUsersPosts() public method

public GetUsersPosts ( string currentUser ) : IEnumerable
currentUser string
return IEnumerable

RegisterRoles() public method

public RegisterRoles ( ) : int
return int

SetLike() public method

public SetLike ( System.Guid postId, System.Guid accountId ) : bool
postId System.Guid
accountId System.Guid
return bool

UpdateAvatar() public method

public UpdateAvatar ( System.Guid accountId, byte Avatar, string mimetype ) : bool
accountId System.Guid
Avatar byte
mimetype string
return bool

UpdateCityAndCountry() public method

public UpdateCityAndCountry ( System.Guid id, string newCity, string newCountry ) : bool
id System.Guid
newCity string
newCountry string
return bool

UpdateMail() public method

public UpdateMail ( System.Guid id, string newMail ) : bool
id System.Guid
newMail string
return bool

UpdateName() public method

public UpdateName ( System.Guid id, string newName ) : bool
id System.Guid
newName string
return bool

UpdatePassword() public method

public UpdatePassword ( System.Guid id, string password ) : bool
id System.Guid
password string
return bool

UpdateRole() public method

public UpdateRole ( System.Guid accountId, int roleCode ) : bool
accountId System.Guid
roleCode int
return bool