示例#1
0
        public ActionConfirmation SaveOrUpdateMember(ProjectMember member)
        {
            if (!member.IsValid())
            {
                return(ActionConfirmation.CreateFailure("miembro no válido"));
            }

            try
            {
                _memberRepository.SaveOrUpdate(member);
                _memberRepository.DbContext.CommitChanges();

                return(ActionConfirmation.CreateSuccess("member created"));
            }
            catch (System.Exception exception)
            {
                return(ActionConfirmation.CreateFailure(exception.ToString()));
            }
        }