public ToysController(FinalContext context, UserManager <User> userManager, IApplicationEnvironment hostingEnvironment) { _context = context; _userManager = userManager; USER_IMAGES_DIR = Path.Combine(hostingEnvironment.ApplicationBasePath, "wwwroot", USER_IMAGES_FOLDER_NAME); Directory.CreateDirectory(USER_IMAGES_DIR); }
public ContactsVM() { var db = new FinalContext(); ContactList = db.People.Local; db.People.Load(); EmailList = new ObservableCollection <Email>(); AddressList = new ObservableCollection <Address>(); PhoneList = new ObservableCollection <Phone>(); TypeList = new ObservableCollection <CType>(); SaveCommand = new DelegateCommand(() => db.SaveChanges()); AddPersonCommand = new DelegateCommand(() => { CurrentPerson = new Person(); ContactList.Add(CurrentPerson); db.People.Add(CurrentPerson); }); AddEmailCommand = new DelegateCommand(() => { var em = new Email(); CurrentPerson.Emails.Add(em); }); DeletePersonCommand = new DelegateCommand(() => { db.People.Remove(CurrentPerson); ContactList.Remove(CurrentPerson); }); AddPhoneCommand = new DelegateCommand(() => { var pn = new Phone(); CurrentPerson.Phones.Add(pn); }); AddAddressCommand = new DelegateCommand(() => { var ad = new Address(); CurrentPerson.Addresses.Add(ad); }); DeleteAddressCommand = new DelegateCommand(() => { db.Addresses.Remove(CurrentAddress); AddressList.Remove(CurrentAddress); }); DeletePhoneCommand = new DelegateCommand(() => { db.Phones.Remove(CurrentPhone); PhoneList.Remove(CurrentPhone); }); DeleteEmailCommand = new DelegateCommand(() => { db.Emails.Remove(CurrentEmail); EmailList.Remove(CurrentEmail); }); }
public HomeController(FinalContext context) { _context = context; }
public BrandController(FinalContext ctx) => data = new Repository <Brand>(ctx);
public PaisController(FinalContext context) { _context = context; }
public GodsController(FinalContext context) { _context = context; }
public CategoryList(FinalContext context) { Context = context; }
public AllToysList(FinalContext context) { Context = context; }
public DepartmentController(FinalContext ctx) => data = new Repository <Department>(ctx);
public InstrumentController(FinalContext ctx) => data = new FinalUnitOfWork(ctx);
public StudentsController(FinalContext context, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostEnvironment) { _context = context; webHostEnvironment = hostEnvironment; }
public HeroesController(FinalContext context) { _context = context; }
public QueriesController(FinalContext context, UserManager <User> userManager) { _context = context; _userManager = userManager; }
public CountriesController(FinalContext context) { _context = context; }
public JugadorsController(FinalContext context) { _context = context; }
public BlogController(FinalContext _context) { this._context = _context; }
public ForumRepository(FinalContext c) { context = c; }
public EnrollmentsController(FinalContext context) { _context = context; }
public ToyListByCategory(FinalContext context) { Context = context; }
public LoginsController(FinalContext context) { dbContext = context; }
public ToyListFromList(FinalContext context) { Context = context; }
public FinalController(FinalContext context) { dbContext = context; }
public HomeController(FinalContext ctx) => data = new Repository <Instrument>(ctx);
public ValidationController(FinalContext ctx) { brandData = new Repository <Brand>(ctx); departmentData = new Repository <Department>(ctx); }