I\'ve create a new servicecollection object and added a service. But, when I build the service provider and try to get service, it returns null. Example below.