public void Post([FromBody] List <RequestJSONModel> res)
        {
            //sent data to list
            List <RequestJSONModel> receivedItems = res.ToList();

            //iteration on the list of objects
            for (int i = 0; i < receivedItems.Count(); i++)
            {
                try
                {
                    //parse
                    RequestJSONModel dataItem = new RequestJSONModel
                    {
                        Index  = receivedItems[i].Index,
                        Name   = receivedItems[i].Name,
                        Visits = receivedItems[i].Visits,
                        Date   = receivedItems[i].Date
                    };
                    //calling repo
                    _repository.AddItem(dataItem);
                }
                catch (Exception e)
                {
                    Debug.WriteLine(e);
                }
            }
        }
        public void AddItem(RequestJSONModel request)
        {
            RequestJSONModel dataItem = new RequestJSONModel
            {
                Index  = request.Index,
                Name   = request.Name,
                Visits = request.Visits,
                Date   = request.Date
            };

            _context.Requests.Add(dataItem);
            _context.SaveChanges();
        }