public void DeletePartner(GreekPartnerModel partner)
 {
     using (IDocumentSession session = DataDocumentStore.Store.OpenSession())
     {
         var delPartner = session.Load<GreekPartnerModel>(partner.Id);
         session.Delete(delPartner);
         session.SaveChanges();
     }
 }
        public ActionResult UpdatePartner([DataSourceRequest] DataSourceRequest request, GreekPartnerModel partner)
        {
            if (partner != null && ModelState.IsValid)
            {
                _greekPartnerRepository.UpdatePartner(partner);
            }

            return Json(new[] { partner }.ToDataSourceResult(request, ModelState));
        }
        public GreekPartnerModel CreatePartner(GreekPartnerModel partner)
        {
            using (IDocumentSession session = DataDocumentStore.Store.OpenSession())
            {
                session.Store(partner);
                session.SaveChanges();
            }

            return partner;
        }
        public GreekPartnerModel UpdatePartner(GreekPartnerModel partner)
        {
            //var modelData = JsonConvert.SerializeObject(partner);

            using (IDocumentSession session = DataDocumentStore.Store.OpenSession())
            {
                session.Store(partner);
                session.SaveChanges();
            }

            return partner;
        }