C# Class BistroDriveWebApp.Models.DishRepository

Show file Open project: PI-13-5/BistroDriveWebApp

Public Methods

Method Description
AddDish ( dish item ) : void
AddDishReview ( string owner, int dish_id, int mark, string text ) : void
Delete ( int id ) : void
DeleteDishReview ( int id ) : void
DishRepository ( BistroDriveEntities _context ) : System
EditDishReview ( int id_dishrevew, int mark, string text ) : void
GetDishById ( int id ) : dish
GetDishByTypeId ( int Id ) : IEnumerable
GetDishByUserId ( string Id, int limit ) : IEnumerable
GetDishCount ( ) : int
GetDishList ( ) : IEnumerable
GetDishList ( int page, int pageSize, int &count, string search = "", int CityId, string dishinput = "", bool canTeach = false, bool travel = false, int minPrice = -1, int maxPrice = -1 ) : IEnumerable
GetDishOwner ( int Id_Dish ) : string
GetDishReviewByDishId ( int id_dish ) : List
GetDishReviewById ( int id ) : dishreview
GetDishTypes ( ) : IEnumerable
GetMaxPrice ( ) : int
GetMinPrice ( ) : int
UpdateDish ( DishViewModel model ) : void

Private Methods

Method Description
UpdateDishRating ( dishreview dr ) : void

Method Details

AddDish() public method

public AddDish ( dish item ) : void
item dish
return void

AddDishReview() public method

public AddDishReview ( string owner, int dish_id, int mark, string text ) : void
owner string
dish_id int
mark int
text string
return void

Delete() public method

public Delete ( int id ) : void
id int
return void

DeleteDishReview() public method

public DeleteDishReview ( int id ) : void
id int
return void

DishRepository() public method

public DishRepository ( BistroDriveEntities _context ) : System
_context BistroDriveEntities
return System

EditDishReview() public method

public EditDishReview ( int id_dishrevew, int mark, string text ) : void
id_dishrevew int
mark int
text string
return void

GetDishById() public method

public GetDishById ( int id ) : dish
id int
return dish

GetDishByTypeId() public method

public GetDishByTypeId ( int Id ) : IEnumerable
Id int
return IEnumerable

GetDishByUserId() public method

public GetDishByUserId ( string Id, int limit ) : IEnumerable
Id string
limit int
return IEnumerable

GetDishCount() public method

public GetDishCount ( ) : int
return int

GetDishList() public method

public GetDishList ( ) : IEnumerable
return IEnumerable

GetDishList() public method

public GetDishList ( int page, int pageSize, int &count, string search = "", int CityId, string dishinput = "", bool canTeach = false, bool travel = false, int minPrice = -1, int maxPrice = -1 ) : IEnumerable
page int
pageSize int
count int
search string
CityId int
dishinput string
canTeach bool
travel bool
minPrice int
maxPrice int
return IEnumerable

GetDishOwner() public method

public GetDishOwner ( int Id_Dish ) : string
Id_Dish int
return string

GetDishReviewByDishId() public method

public GetDishReviewByDishId ( int id_dish ) : List
id_dish int
return List

GetDishReviewById() public method

public GetDishReviewById ( int id ) : dishreview
id int
return dishreview

GetDishTypes() public method

public GetDishTypes ( ) : IEnumerable
return IEnumerable

GetMaxPrice() public method

public GetMaxPrice ( ) : int
return int

GetMinPrice() public method

public GetMinPrice ( ) : int
return int

UpdateDish() public method

public UpdateDish ( DishViewModel model ) : void
model DishViewModel
return void