public InvolvedDataObject Update(InvolvedDataObject involved)
        {
            Involved entity = this.involvedRepository.FindByID(involved.ID);

            entity = DyMapper.Map(involved, entity);
            this.involvedRepository.Update(entity);
            int result = this.involvedRepository.Commit();

            if (result > 0)
            {
                return(DyMapper.Map <Involved, InvolvedDataObject>(entity));
            }
            else
            {
                return(null);
            }
        }
        public InvolvedDataObject Add(InvolvedDataObject involved)
        {
            Involved entity = this.involvedRepository.Create();

            entity = DyMapper.Map(involved, entity);
            this.involvedRepository.Add(entity);
            int result = this.involvedRepository.Commit();

            if (result > 0)
            {
                return(DyMapper.Map <Involved, InvolvedDataObject>(entity));
            }
            else
            {
                return(null);
            }
        }
Example #3
0
 public JsonResult <InvolvedDataObject> AddInvolved(InvolvedDataObject involved)
 {
     return(Json(this.involvedService.Add(involved)));
 }