public DetailHotelParam(DetailHotel detailhotel) { this.Id = detailhotel.Id; this.Hotels = detailhotel.Hotels; this.Address = detailhotel.Address; this.IsDelete = detailhotel.IsDelete; this.CreateDate = detailhotel.CreateDate; this.UpdateDate = detailhotel.UpdateDate; this.DeleteDate = detailhotel.DeleteDate; this.CreateBy = ""; //isi this.UpdateBy = ""; //isi this.DeleteBy = ""; //isi }
public bool Insert(DetailHotelParam _detailhotelparam) { var push = new DetailHotel(_detailhotelparam); context.DetailHotels.Add(push); var result = context.SaveChanges(); if (result > 0) { status = true; } return(status); throw new NotImplementedException(); }
public DetailHotel Get(int?id) { if (id == null) { Console.Write("id is null"); } DetailHotel detailhotel = context.DetailHotels.SingleOrDefault(x => x.Id == id); if (detailhotel == null) { Console.Write("Facility has not value"); } return(detailhotel); throw new NotImplementedException(); }