public async Task <ActionResult <T> > GetAsync(string name) { try { return(Ok(await Dataloader.LoadAsync <T>(Type, name))); } catch (Exception) { return(null); } }
public async Task <ActionResult <IEnumerable <TtTranslation> > > SearchLabelText(string value, Languages lang = Languages.Default) { try { var list = await Dataloader.LoadAsync <Translation>(Type, lang.ToString()) as Translation; var res = list?.Get <TtTranslation>(r => r.SdText.StartsWith(value, true, null)); return(Ok(res)); } catch (Exception) { return(null); } }
public async Task <ActionResult <IEnumerable <TtMessage> > > SearchMessageText(string value, Languages lang = Languages.Default) { try { var list = await Dataloader.LoadAsync <Messages>(Type, lang.ToString()) as Messages; var res = list?.Get <TtMessage>(r => r.MessageDescription.StartsWith(value, true, null)); return(Ok(res)); } catch (Exception) { return(null); } }