static void Main(string[] args) { new GrpcServerBuilder() .UseHost("0.0.0.0") .UsePort(8051) .AddService((options, mapper) => BranchSrv.BindService(new BranchService(mapper, options))) .AddService((options, mapper) => ItemSrv.BindService(new ItemService(mapper, options))) .AddService((options, mapper) => PriceSrv.BindService(new PriceService(mapper, options))) .AddService((options, mapper) => SupplierSrv.BindService(new SupplierService(mapper, options))) .Start(); }
public void InitializeDataContext() { FileFiller fileFiller = new FileFiller(); StaticFiller staticFiller = new StaticFiller(); db = new DataContext(fileFiller); db.SetFiller(staticFiller); db.Fill(); eventSrv = new EventSrv(db); clientSrv = new ClientSrv(db); bookSrv = new BookSrv(db, eventSrv, clientSrv); supplierSrv = new SupplierSrv(db); userFcd = new UserFcd(bookSrv, clientSrv, eventSrv, supplierSrv); }