public async Task<bool> Save(Flower flower) { using (var client = new HttpClient()) { var url = string.Format( RequestUrl, WebConstants.AuthenticationKey, WebConstants.AuthenticationId, WebConstants.ActionKey, WebConstants.ActionSave, DateTime.Now.Ticks); var json = JsonConvert.SerializeObject(flower); var content = new FormUrlEncodedContent( new[] { new KeyValuePair<string, string>("flower", json) }); var response = await client.PostAsync(url, content); return response.StatusCode == System.Net.HttpStatusCode.OK; } }
public FlowerViewModel(IFlowersService flowerService, Flower model) { _flowerService = flowerService; Model = model; }
public Task<bool> Save(Flower flower) { return null; }