示例#1
0
        public AcademyPhone AddAcademyPhone(AddAcademyPhoneRequest request)
        {
            AcademyPhone phone = null;

            if (request != null && request.AcademyPhone != null)
            {
                var dataAccess = new AcademyPhoneDataAccess(request.Context);

                phone = dataAccess.Add(request.AcademyPhone);
            }

            return(phone);
        }
示例#2
0
        public AcademyPhone AddAcademyPhone([FromBody] AcademyPhone phone)
        {
            if (phone != null)
            {
                var business = AcademyBusiness.Instance;
                var request  = new AddAcademyPhoneRequest(this.Context);
                request.AcademyPhone = phone;

                phone = business.AddAcademyPhone(request);
            }

            return(phone);
        }