Esempio n. 1
0
 public int BookSeats(CoreModels.BookingInfo bookSeats)
 {
     using (var database = new Database("BookMyShow"))
     {
         return(Convert.ToInt16(database.Insert("BookingInfo", "Id", bookSeats.Map <DataModels.BookingInfo>())));
     }
 }
Esempio n. 2
0
 public List <CoreModels.BookingInfo> GetBookedSeats(CoreModels.BookingInfo bookingInfo)
 {
     DataModels.BookingInfo dMbookingInfo = bookingInfo.Map <DataModels.BookingInfo>();
     using (var database = new Database("BookMyShow"))
     {
         return(database.Fetch <DataModels.BookingInfo>("Select * from BookingInfo where MovieId=@0 AND TheaterId=@1 AND ShowDate=@2 AND ShowTime=@3", dMbookingInfo.MovieId, dMbookingInfo.TheaterId, dMbookingInfo.ShowDate, dMbookingInfo.ShowTime).MapCollection <List <DataModels.BookingInfo>, List <CoreModels.BookingInfo> >());
     }
 }