Sort files

***Sort Files***
@{var photos = item.GetFiles("Photos");} 
           
@if(photos.Count > 0) {
   
    photos.Sort((x,y) => (string.IsNullOrEmpty(x.Title) ? x.Filename : x.Title)
        .CompareTo((string.IsNullOrEmpty(y.Title) ? y.Filename : y.Title)));
    
    <div class="card-columns">
        @foreach(FileFieldItem f in photos){
            if(f.ContentType.StartsWith("image/")) {
            <a href="@f.Url?width=1200&height=800" data-lightbox="gallery" data-title="@(!String.IsNullOrEmpty(f.Title)? f.Title: "") @(!String.IsNullOrEmpty(f.Description)? "- " + f.Description: "") <br/><a href='@f.Url'>Download image</a>" >
                 <div class="card card-inverse" style="text-align:center;">
                   <img src="@f.Url?width=700&height=700" class="card-img-top img-fluid" alt="@f.Description" />
                
                @if(!String.IsNullOrEmpty(f.Title)){
                <div class="card-img-overlay" style="text-align:left">
                    <small>@f.Title</small>
                    @*
                    @if(!String.IsNullOrEmpty(f.Description)){
                        <span> - @f.Description</span>
                    }
                    *@
                </div>
                }
            </div></a>
            }
        }
    </div>    

            }