Beispiel #1
0
        public async Task <BaseViewModel <Post> > GetPostAsync(int id, int numberRelated)
        {
            var post = await GetFirstAsync(p => p.Id == id, p => p.Category,
                                           p => p.Category.Doctors, p => p.Category.Medicins, p => p.Category.Diseases, p => p.User);

            return(serviceBuilder.BuildViewModel(new PostViewModel(post, numberRelated, post.CategoryId)));
        }
 public async Task <BaseViewModel <Medicin> > GetMedicinAsync(int id, int numberRelated)
 {
     return(serviceBuilder.BuildViewModel(new MedicinViewModel(await GetMedicin(id), numberRelated)));
 }
 public BaseViewModel <BeatyandHealthy> GetBoardViewModel(int pageSize)
 {
     return(serviceBuilder.BuildViewModel(new DashBoardViewModel(pageSize)));
 }
Beispiel #4
0
 public async Task <BaseViewModel <Disease> > GetDiseaseAsync(int id, int numberRelated)
 {
     return(serviceBuilder.BuildViewModel(new DiseaseViewModel(await GetDisease(id), numberRelated)));
 }