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);
        }
Beispiel #2
0
        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);
            });
        }
Beispiel #3
0
 public HomeController(FinalContext context)
 {
     _context = context;
 }
Beispiel #4
0
 public BrandController(FinalContext ctx) => data = new Repository <Brand>(ctx);
 public PaisController(FinalContext context)
 {
     _context = context;
 }
Beispiel #6
0
 public GodsController(FinalContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public CategoryList(FinalContext context)
 {
     Context = context;
 }
Beispiel #8
0
 public AllToysList(FinalContext context)
 {
     Context = context;
 }
Beispiel #9
0
 public DepartmentController(FinalContext ctx) => data = new Repository <Department>(ctx);
Beispiel #10
0
 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;
 }
Beispiel #13
0
 public QueriesController(FinalContext context, UserManager <User> userManager)
 {
     _context     = context;
     _userManager = userManager;
 }
 public CountriesController(FinalContext context)
 {
     _context = context;
 }
Beispiel #15
0
 public JugadorsController(FinalContext context)
 {
     _context = context;
 }
Beispiel #16
0
 public BlogController(FinalContext _context)
 {
     this._context = _context;
 }
Beispiel #17
0
 public ForumRepository(FinalContext c)
 {
     context = c;
 }
 public EnrollmentsController(FinalContext context)
 {
     _context = context;
 }
Beispiel #19
0
 public ToyListByCategory(FinalContext context)
 {
     Context = context;
 }
Beispiel #20
0
 public LoginsController(FinalContext context)
 {
     dbContext = context;
 }
Beispiel #21
0
 public ToyListFromList(FinalContext context)
 {
     Context = context;
 }
Beispiel #22
0
 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);
 }