private static void WorkWithRecord() { var service = _serviceProvider.GetRequiredService <IService <Record, int> >(); var controller = new RecordsController(service); controller.Start(); }