public async Task FillSupplier(bitsContext dbContext, int supplierId) { SimpleSupplier s = await dbContext.Supplier.Include("SupplierAddress").Where(s => s.SupplierId == supplierId).FirstOrDefaultAsync(); SupplierId = s.SupplierId; Name = s.Name; Phone = s.Phone; Email = s.Email; ContactFirstName = s.ContactFirstName; ContactLastName = s.ContactLastName; ContactPhone = s.ContactPhone; Note = s.Note; Website = s.Website; foreach (SupplierAddress sAddress in s.SupplierAddress) { int addressId = sAddress.AddressId; int addressTypeId = sAddress.AddressTypeId; SimpleAddress address = await dbContext.Address.FindAsync(addressId); AddressType aType = await dbContext.AddressType.FindAsync(addressTypeId); Addresses.Add(new Address(addressId, address.StreetLine1, address.StreetLine2, address.City, address.State, address.Zipcode, addressTypeId, aType.Name)); } }
public void Setup() { dbContext = new bitsContext(); supList = dbContext.Supplier.OrderBy(s => s.SupplierId).ToList(); supAddrList = dbContext.SupplierAddress.OrderBy(s => s.SupplierId).ToList(); addTypeList = dbContext.AddressType.OrderBy(s => s.AddressTypeId).ToList(); addresses = dbContext.Address.OrderBy(s => s.AddressId).ToList(); }
public void Setup() { dbContext = new bitsContext(); recipeList = dbContext.Recipe.Where(s => s.RecipeId == 1).ToList(); recipeIngList = dbContext.RecipeIngredient.Where(s => s.RecipeId == 1).ToList(); ingList = dbContext.Ingredient.OrderBy(s => s.IngredientId).ToList(); ingTypeList = dbContext.IngredientType.OrderBy(s => s.IngredientTypeId).ToList(); ingOrderList = dbContext.IngredientInventoryAddition.OrderBy(s => s.IngredientInventoryAdditionId).ToList(); supList = dbContext.Supplier.OrderBy(s => s.SupplierId).ToList(); }
public RecipesController(bitsContext context) { _context = context; }
public AdjunctTypesController(bitsContext context) { _context = context; }
public SuppliersController(bitsContext context) { _context = context; }
public HopTypesController(bitsContext context) { _context = context; }
public IngredientUsedInsController(bitsContext context) { _context = context; }
public AppConfigsController(bitsContext context) { _context = context; }
public YeastsController(bitsContext context) { _context = context; }
public InventoryTransactionsController(bitsContext context) { _context = context; }
public ContainerTypesController(bitsContext context) { _context = context; }
public BarrelsController(bitsContext context) { _context = context; }
public IngredientTypesController(bitsContext context) { _context = context; }
public IngredientInventoryAdditionsController(bitsContext context) { _context = context; }
public UnitTypesController(bitsContext context) { _context = context; }
public BrewContainersController(bitsContext context) { _context = context; }
public ProductContainerSizesController(bitsContext context) { _context = context; }
public FermentableTypesController(bitsContext context) { _context = context; }
public StylesController(bitsContext context) { _context = context; }
public ProductContainerInventoriesController(bitsContext context) { _context = context; }
public AppUsersController(bitsContext context) { _context = context; }
public AccountsController(bitsContext context) { _context = context; }
public AddressesController(bitsContext context) { _context = context; }
public UseDuringsController(bitsContext context) { _context = context; }
public ProductsController(bitsContext context) { _context = context; }
public SupplierAddressesController(bitsContext context) { _context = context; }
public MashStepsController(bitsContext context) { _context = context; }
public ContainerStatusController(bitsContext context) { _context = context; }
public IngredientInventorySubtractionsController(bitsContext context) { _context = context; }