因此,在我的查询中,我有多个 then include 以包含所有相关数据。在最后一个 include 语句中,我想添加一个条件,但由于我的 linq 语句,我收到了“无效的 lambda 表达式响应。
Class Sample1
{
public int Id { get; set; }
public ICollection<Sample2> S2 { get; set;}
}
Class Sample2
{
public Sample3 S3 { get; set; }
public Sample1 S1 { get; set;}
}
Class Sample3
{
public int Id { get; set; }
public ICollection<Sample4> S4 { get; set;}
}
Class Sample4
{
public Sample3 S3 { get; set; }
public Sample5 S5 { get; set;}
}
Class …Run Code Online (Sandbox Code Playgroud) c# asp.net entity-framework entity-framework-core asp.net-core
所以我正在使用 ngx-bootstrap。当我使用单图像轮播时,它工作得很好,但在多图像中,我得到的只是左边的第一张图像,没有别的。
<p>
If `true` - carousel indicators indicate slides chunks works ONLY if singleSlideOffset = FALSE
</p>
<carousel [itemsPerSlide]="itemsPerSlide"
[singleSlideOffset]="false"
[interval]="false"
[indicatorsByChunk]="true">
<slide *ngFor="let slide of slides; let index=index">
<img [src]="slide.image" alt="image slide" style="display: block; width: 100%;">
<div class="carousel-caption">
<h4>Slide {{index}}</h4>
</div>
</slide>
</carousel>
Run Code Online (Sandbox Code Playgroud)
下面是角度代码
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent { itemsPerSlide = 3;
singleSlideOffset = false;
noWrap = false;
slides = [
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'}, …Run Code Online (Sandbox Code Playgroud)