これが私の見解です
SELECT AmenityValidDatesPriceID, AmenityID, AmenityValidDatesFrom, AmenityValidDatesTo, AddedDate, LastModifyDate, AddedUser, LastModifyUser,
IsDeleted
FROM dbo.DataManagement_Hotels_Amenities_AmenityValidDatesPrice
WHERE (IsDeleted = 0)
AmenityValidDatesFrom、AmenityValidDatesToを日時として返します
フロントエンドでは日付が必要です
public List<BLL.Entities.DataManagement_Hotels_Amenities_AmenityValidDatesPrice> SelectByAmenityID(int ID)
{
DAL.DynamicSearchViewDataContext Viewcontext = new DAL.DynamicSearchViewDataContext();
DAL.SelectSectionDataContext SpContext = new DAL.SelectSectionDataContext();
var Query = (from car in Viewcontext.View_DataManagement_Hotel_Amenities_Dates
where car.AmenityID.Equals(ID)
select new BLL.Entities.DataManagement_Hotels_Amenities_AmenityValidDatesPrice
{
AmenityID = (int)car.AmenityID,
//AmenityValidDatesFrom = (DateTime)car.AmenityValidDatesFrom,
//AmenityValidDatesTo = (DateTime)car.AmenityValidDatesTo
AmenityValidDatesFrom = ((DateTime)car.AmenityValidDatesFrom).Date,
AmenityValidDatesTo = ((DateTime)car.AmenityValidDatesTo).Date
}).ToList<BLL.Entities.DataManagement_Hotels_Amenities_AmenityValidDatesPrice>();
return Query;
}
これは私のコードです
それは与える
エラー暗黙的に変換