public static async Task <HttpResponseMessage> Update(LanguageDto data) { using (var client = ProjectNameApiClient.Get()) { return(await client.PutAsync("Language", ProjectNameApiClient.ConvertToContent(data))); } }
public static async Task <HttpResponseMessage> Delete(LanguageDto data) { using (var client = ProjectNameApiClient.Get()) { return(await client.DeleteAsync($"Language/{data.Id}")); } }
public static async Task <List <LanguageDto> > GetById(int Id) { using (var client = ProjectNameApiClient.Get()) { var response = await client.GetAsync($"Language/{Id}"); var json = await response.Content.ReadAsStringAsync(); return(JsonConvert.DeserializeObject <List <LanguageDto> >(json)); } }