public static T CreateService <T>(FaciTechDbContext context) where T : new() { var targetService = new T(); FacitechBusinessService facitechBusinessService = targetService as FacitechBusinessService; if (facitechBusinessService != null) { facitechBusinessService._faciTechDbContext = context; facitechBusinessService.OnInt(); } return(targetService); }
public T CreateService <T>() where T : new() { var targetService = new T(); FacitechBusinessService facitechBusinessService = targetService as FacitechBusinessService; if (facitechBusinessService != null) { facitechBusinessService.ContactId = this._contactId; facitechBusinessService._faciTechDbContext = FaciTechDbContext; facitechBusinessService.OnInt(); } return(targetService); }