...
This commit is contained in:
@@ -34,10 +34,23 @@ namespace Back.Services
|
||||
Title = s.Title,
|
||||
Date=s.Date,
|
||||
ID=s.ID,
|
||||
Photo=string.IsNullOrEmpty(s.Photo) ? "blog-grid-1.jpg" : s.Photo
|
||||
Photo=string.IsNullOrEmpty(s.Photo) ? "blog-SampleTitle.jpg" : s.Photo
|
||||
}).Paging(PageIndex, PageSize); ;
|
||||
}
|
||||
|
||||
|
||||
public async Task<BlogDtoFull?> GetBlogByID(int ID)
|
||||
{
|
||||
var result= await _repoBlog.Get(w => w.Status && w.ID==ID)
|
||||
.Select(s => new BlogDtoFull
|
||||
{
|
||||
Title = s.Title,
|
||||
Date = s.Date,
|
||||
ID = s.ID,
|
||||
Photo = string.IsNullOrEmpty(s.Photo) ? "blog-SampleTitle.jpg" : s.Photo,
|
||||
Text=s.Text,
|
||||
Time=s.Time
|
||||
}).FirstOrDefaultAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user