public BookingBussinessEntity GetBookingDetailsByReferenceID(string referenceid) { BookingDataEntity bookingDataAccessObject = GetBookingCampDataServices.GetBookingDetailsByReferenceID(referenceid); BookingBussinessEntity bookingBussinessObject = MapperFromBLtoDA.Mapping <BookingDataEntity, BookingBussinessEntity>(bookingDataAccessObject); return(bookingBussinessObject); }
public CampBussinessEntity RequestCampById(int id) { CampDataEntity campDataEntityObject = campDataServicesObject.GetCampByIDFromDb(id); CampBussinessEntity campBussinessEntityObject = MapperFromBLtoDA.Mapping <CampDataEntity, CampBussinessEntity>(campDataEntityObject); return(campBussinessEntityObject); }
public bool RequestAuthentication(UserBussinessEntity userBussinessEntityObject) { //bool result = false; UserDataEntity userDataEntityObject = MapperFromBLtoDA.Mapping <UserBussinessEntity, UserDataEntity>(userBussinessEntityObject); bool result = userDataServiceObject.ValidateAuthentication(userDataEntityObject); return(result); }
public IList <CampBussinessEntity> GetFilterCamps(DateTime startdate, DateTime enddate, int capacity) { IList <CampRatingModel> listOFCampDataAccess = GetBookingCampDataServices.GetFilterCamps(startdate, enddate, capacity); IList <CampBussinessEntity> listOfCampBussiness = new List <CampBussinessEntity>(); foreach (var currentCamp in listOFCampDataAccess) { CampBussinessEntity campBussinessEntityObject = MapperFromBLtoDA.Mapping <CampRatingModel, CampBussinessEntity>(currentCamp); listOfCampBussiness.Add(campBussinessEntityObject); } return(listOfCampBussiness); }
public bool CampRating(RatingBussinessEntity ratingBussinessObject) { CampRatingDataEntity ratingDataObject = MapperFromBLtoDA.Mapping <RatingBussinessEntity, CampRatingDataEntity>(ratingBussinessObject); bool done = GetBookingCampDataServices.CreateCampRating(ratingDataObject, ratingBussinessObject.ReferenceId); //bool result = false; if (done == false) { throw new Exception("Something Went Wrong"); } return(done); }
public IList <CampBussinessEntity> RequestAllCamps() { IList <CampRatingModel> allCampsOfCampDataEntity = campDataServicesObject.RequestAllCampsFromDb(); IList <CampBussinessEntity> allCampsOfCampBussinessEntity = new List <CampBussinessEntity>(); foreach (var currentCamp in allCampsOfCampDataEntity) { CampBussinessEntity campBussinessEntityObject = MapperFromBLtoDA.Mapping <CampRatingModel, CampBussinessEntity>(currentCamp); allCampsOfCampBussinessEntity.Add(campBussinessEntityObject); } return(allCampsOfCampBussinessEntity); }
public bool UpdateCampRequest(CampBussinessEntity campBussinessEntityObject, int id) { CampDataEntity campDataEntityObject = MapperFromBLtoDA.Mapping <CampBussinessEntity, CampDataEntity>(campBussinessEntityObject); int NumberOfRowsAffected = campDataServicesObject.UpdateCamp(campDataEntityObject, id); bool result = false; if (NumberOfRowsAffected != 0) { result = true; } return(result); }
public string CampBooking(BookingBussinessEntity bookingBussinessObject) { Guid obj = Guid.NewGuid(); string var = obj.ToString(); string str = var.Substring(0, 8); bookingBussinessObject.ReferenceId = str; BookingDataEntity bookingDAL = MapperFromBLtoDA.Mapping <BookingBussinessEntity, BookingDataEntity>(bookingBussinessObject); int NumberOfRowsAffected = GetBookingCampDataServices.CreateBooking(bookingDAL); //bool result = false; if (NumberOfRowsAffected == 0) { throw new Exception("Something Went Wrong"); } return(bookingBussinessObject.ReferenceId); }