public static PriceRangeController GetInitialisedPriceRangeController(IPriceRangeService priceRangeService) { var controller = new PriceRangeController(priceRangeService) { Request = new HttpRequestMessage { RequestUri = new Uri("http://localhost/api/") }, Configuration = new HttpConfiguration() }; controller.Configuration.MapHttpAttributeRoutes(); controller.Configuration.EnsureInitialized(); return controller; }
public LawyerApiController(ILawyerService lawyerService, ILawyerAppointmentService lawyerAppointmentService, ISesstionService SesstionService, IPriceRangeService PriceRangeService, IDocumentService DocumentService, ICountryService CountryService, IReviewService ReviewService, IServiceService ServiceService, IEmailSender emailSender, UserManager <ApplicationUser> userManager, ILoggerManager logger, ApplicationDbContext con) : base(userManager, logger) { this.lawyerService = lawyerService; this.lawyerAppointmentService = lawyerAppointmentService; this.SesstionService = SesstionService; this.PriceRangeService = PriceRangeService; this.DocumentService = DocumentService; this.CountryService = CountryService; this.ReviewService = ReviewService; this.ServiceService = ServiceService; this.emailSender = emailSender; this.con = con; }
public PriceRangeController(IPriceRangeService priceRangeService) { Check.If(priceRangeService).IsNotNull(); _priceRangeService = priceRangeService; }