using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;  
using System.Web.Http;

using WebApplication1.Models;

namespace UslugaREST.Controllers
{
    [RoutePrefix("api/wpisy")]
    public class WpisyController : ApiController
    {
        public string Get()
        {
            return "Hello World!";
        }

        const string nazwaPlikuXml = @"d:\JacekMatulewski\wpisy.xml";
        Wpisy wpisy = new Wpisy(nazwaPlikuXml);

        [HttpGet]
        [Route("liczba")]
        public int PobierzLiczbę()
        {
            return wpisy.Liczba;
        }
    }
}
