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); }
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); }