示例#1
0
        public bool CreateInstroduction(InstroductionRequest request)
        {
            if (request == null)
            {
                return(false);
            }

            var newItem = new Instroductions
            {
                Name        = request.Name,
                Description = request.Description,
                CreatedBy   = 1,
                CreatedDate = DateTime.Now
            };

            _instroductionRepository.Add(newItem);

            return(_unitOfWork.Commit());
        }
示例#2
0
 public static InstroductionResponse ConvertModelToResponse(this Instroductions instroduction)
 {
     return(Mapper.Map <Instroductions, InstroductionResponse>(instroduction));
 }