public async Task <object> Get(DataSourceLoadOptions loadOptions) { try { var vrsteHomologacije = VrsteHomologacijeDAO.GetAllVrsteHomologacije(0); object result = await Task.Run(() => DataSourceLoader.Load(vrsteHomologacije, loadOptions)); return(result); } catch (Exception) { object result = await Task.Run(() => DataSourceLoader.Load(new List <VrsteHomologacijeModel>(), loadOptions)); return(result); } }
public async Task <object> GetDetail(DataSourceLoadOptions loadOptions) { try { var vrsteHomologacije = VrsteHomologacijeDAO.GetAllVrsteHomologacije(1); foreach (var item in vrsteHomologacije) { item.AtributSet = VrsteHomologacijeDAO.GetAtributSet(item.Id); } object result = await Task.Run(() => DataSourceLoader.Load(vrsteHomologacije, loadOptions)); return(result); } catch (Exception) { object result = await Task.Run(() => DataSourceLoader.Load(new List <VrsteHomologacijeModel>(), loadOptions)); return(result); } }