public DomainInfor Update(DomainInfor domainInfor)
        {
            var domainDetails = _domainInforRepository.Get(domainInfor.Id);
            domainDetails.DomainId = domainInfor.DomainId;
            domainDetails.Content = domainInfor.Content;
            domainDetails.TabNameId = domainInfor.TabNameId;

            _domainInforRepository.CommitChanges();
            return domainDetails;
        }
        public DomainInfor Insert(DomainInfor domainInfor)
        {
            var domainDetails = new DomainInfor();
            domainDetails.DomainId = domainInfor.DomainId;
            domainDetails.Content = domainInfor.Content;
            domainDetails.TabNameId = domainInfor.TabNameId;

            domainDetails = _domainInforRepository.InsertOnCommit(domainDetails);
            _domainInforRepository.CommitChanges();
            return domainDetails;
        }
 public JsonResult Update(DomainInforModel model)
 {
     var modelUpdate = new DomainInfor()
     {
         Id = model.Id,
         DomainId = model.DomainId,
         TabNameId = model.TabNameId,
         Content = model.Content
     };
     modelUpdate = _domainInforService.Update(modelUpdate);
     return Json(new {Id = modelUpdate.Id}, JsonRequestBehavior.AllowGet);
 }
        public JsonResult Create(DomainInforModel model )
        {
            var modelInsert = new DomainInfor()
                                  {
                                      DomainId = model.DomainId,
                                      TabNameId = model.TabNameId,
                                      Content = model.Content
                                  };
         modelInsert=_domainInforService.Insert(modelInsert);

            return Json(new {Id = modelInsert.Id}, JsonRequestBehavior.AllowGet);
        }