在Linq使用的地方

时间:2015-09-16 08:38:15

标签: c# entity-framework linq

var a = from sc in context.SchoolClass
                    join bc in context.BookClass
                    on sc.ClassID equals bc.ClassID  into temp
                    from tt in temp.DefaultIfEmpty()
                    where  bc.ClassID == null && sc.SchoolYear == "2015" 
                    select sc.ClassID;

问题:在上面的代码中," bc.ClassID == null" bc提示不存在! 我知道" bc.ClassID == null"是错的,但我不知道如何做到这一点!

1 个答案:

答案 0 :(得分:1)

由于您在此处执行<Input-Box text="input_text" type="input_type" placeholder="input_placeholder" /> ,因此您将无法访问$scope.input_text = "this is a value"; $scope.input_type = "text"; $scope.input_placeholder = "type something in"; 的属性,您可以通过<input value="this is a value" type="text" /> 访问这些属性,并且它可能包含null匹配行。试试这个: -

$webService = new PrestaShopWebservice($url, $api_key, FALSE);
$xml = $webService->get(array('url' => $url .'/api/combinations?schema=blank'));

$resources = $xml->children()->children();

$resources->id_product          = $ps_product_id;
$resources->wholesale_price     = $wholesale_price;
$resources->price               = $price;
$resources->unit_price_impact   = $unit_price_impact;
$resources->minimal_quantity    = $minimal_quantity;
$resources->quantity            = $quantity;
$resources->weight              = $weight;

$resources->associations->product_option_values->product_option_value[0]->id = $color_id;
$resources->associations->product_option_values->product_option_value[1]->id = $size_id;

$request = $xml->asXML();

//This is a function that curl request to specific URL using method (POST)
$response = ps_curl($url . '/api/combinations', $request, 'POST', $api_key);

$xml_load  = simplexml_load_string($response);
$id        = $xml_load->combination->id;