public register_travel ToDataObj()
        {
            var userLogic = new UserLogic();

            var obj = new register_travel
            {
                tra_loc_id = StationId,
                usr_det_id = userLogic.GetUserIdByCardNo(CardId),
                reg_tra_timestamp = TimeStamp,
                reg_dat_typ_id = Type
            };

            return obj;
        }
 public register_travel InsertRegisterTravel(register_travel registerTravel)
 {
     _db.register_travel.Add(registerTravel);
     _db.SaveChanges();
     return registerTravel;
 }