public async Task <ActionResult <schoolIndicatorPictureRepository> > Get() //public async Task<ActionResult<pictureRepoitoryModel>> Get() { List <repositoryDetailList> repositoryDetailList = new List <repositoryDetailList>(); repositoryDetailList image1 = new repositoryDetailList { current_date = DateTime.Now.ToString(), picture_latitude = 11.11, picture_logitude = 22.22, picture_comment = "Picure Comments", picture_data = new sbyte[] { -1, 2, 3, 4, 5, 6, 7 }, }; repositoryDetailList.Add(image1); repositoryDetailList.Add(image1); pictureRepoitoryModel pictureRepoitory = new pictureRepoitoryModel { school_id = 1, indicatorID = 29, current_date = DateTime.Now.ToString(), pr_id = 1, picture_count = 5, // repositoryDetailList= repositoryDetailList }; List <pictureRepoitoryModel> IndicatorPictureRepository = new List <pictureRepoitoryModel>(); IndicatorPictureRepository.Add(pictureRepoitory); //schoolIndicatorPictureRepository.Add(pictureRepoitory); List <PictureRepository> schoolIndicatorPictureRepository = new List <PictureRepository>(); PictureRepository SchoolIndicatorRepository = new PictureRepository { pictureRepoitoryModel = pictureRepoitory, repositoryDetailList = repositoryDetailList }; schoolIndicatorPictureRepository.Add(SchoolIndicatorRepository); schoolIndicatorPictureRepository schoolIndicatorPictureRepositoryList = new schoolIndicatorPictureRepository() { schoolIndicatorPictureRepositoryList = schoolIndicatorPictureRepository }; return(schoolIndicatorPictureRepositoryList); }
public async Task <ActionResult <pictureRepoitoryModel> > Get() { List <repositoryDetailList> repositoryDetailList = new List <repositoryDetailList>(); repositoryDetailList image1 = new repositoryDetailList { // = 1, //IndicatorID = 29, //ImageID = 1, //DateTime = DateTime.Now, //ImagePath = "byte Array 1", //Latitude = 12.12, //Longitude = 24.24, //Remarks = "Remarks image 1", //SyncDate = DateTime.Now, }; IndicatorDevApp image2 = new IndicatorDevApp { SchoolID = 1, IndicatorID = 29, ImageID = 2, DateTime = DateTime.Now, ImagePath = "byte Array 2", Latitude = 12.12, Longitude = 24.24, Remarks = "Remarks image 2", SyncDate = DateTime.Now, }; // indicatorTrackDevApps.Add(image1); // indicatorTrackDevApps.Add(image2); pictureRepoitoryModel indicatorTrackDevApp = new pictureRepoitoryModel { school_id = 1, indicatorID = 29, current_date = DateTime.Now, picture_count = 5, // repositoryDetailList= indicatorTrackDevApps }; return(indicatorTrackDevApp); }