/// <summary> /// 检查给定id是house还是checkIn /// </summary> /// <param name="id"></param> /// <returns>如果为house,则返回0;如果为checkIn,则返回1;如果都不是,则返回-1</returns> public int CheckTheIdIsHouseOrCheckin(Guid id) { House house = FindOneById(id); if (house != null) { return(0); } else { var checkIn = CheckInService.FindOneById(id); if (checkIn != null) { return(1); } else { return(-1); } } }