Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CandidateModel Create(CandidateModel model)
        {
            var entity = new rec_Candidate();

            model.FillEntity(ref entity);
            return(new CandidateModel(rec_CandidateServices.Create(entity)));
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CandidateModel Update(CandidateModel model)
        {
            var entity = rec_CandidateServices.GetById(model.Id);

            if (entity == null)
            {
                return(null);
            }
            model.FillEntity(ref entity);
            return(new CandidateModel(rec_CandidateServices.Update(entity)));
        }