예제 #1
0
 public FilamentViewModel(FilamentCalcContext context)
 {
     this._context      = context;
     this.Filament      = new Filament();
     this.Filamenttypes = context.FilamentTypes.ToList();
     this.Manufacturers = context.Manufacturers.ToList();
 }
예제 #2
0
 public FilamentViewModel(int?id, FilamentCalcContext context)
 {
     this._context      = context;
     this.Filament      = context.Filaments.FirstOrDefault(c => c.FilamentId == id);
     this.Filamenttypes = context.FilamentTypes.ToList();
     this.Manufacturers = context.Manufacturers.ToList();
 }