示例#1
0
 public IHttpActionResult Post(TareaModel model)
 {
     var data = Repo.Add(model);
     if (data == null)
         return BadRequest();
     return Ok(data);
 }
示例#2
0
        public async Task<TareaModel> AddTarea(TareaModel tarea)
        {
            var request = new RestRequest("Tarea");
            request.Method = Method.POST;
            request.AddJsonBody(tarea);
            var response = await client.Execute<TareaModel>(request);

            if (response.IsSuccess)
                return response.Data;
            return null;
        }
 public NuevaTareaViewModel(INavigator navigator, IService service, IPage page) : base(navigator, service, page)
 {
     _tarea=new TareaModel();
     cmdAdd=new Command(AñadirTarea);
 }