Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 public JsonResult <InvolvedDataObject> AddInvolved(InvolvedDataObject involved)
 {
     return(Json(this.involvedService.Add(involved)));
 }