Exemplo n.º 1
0
 public void Post(int?id, PropertyDetails propertyDetails)
 {
     try
     {
         if (ModelState.IsValid)
         {
             bool            isNew       = !id.HasValue;
             PropertyDetails propDetails = isNew ? new PropertyDetails
             {
                 Id = id.Value
             } : _context.Set <PropertyDetails>().SingleOrDefault(s => s.Id == id.Value);
             propDetails.Address   = propertyDetails.Address;
             propDetails.Financial = propertyDetails.Financial;
             propDetails.Physical  = propertyDetails.Physical;
             if (isNew)
             {
                 _context.Add(propDetails);
             }
             _context.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
        public IActionResult PutpBroker(int id, [FromBody] pBroker pBroker)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != pBroker.pBrokerId)
            {
                return(BadRequest());
            }

            _context.Entry(pBroker).State = EntityState.Modified;

            try
            {
                _context.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!pBrokerExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(new StatusCodeResult(StatusCodes.Status204NoContent));
        }
Exemplo n.º 3
0
        public void DeactivateProperty(int id, string purpose)
        {
            switch (purpose)
            {
            case "rental":
                var rental = _db.RentalProperties.FirstOrDefault(m => m.Id == id);
                rental.IsActive = false;
                _db.SaveChanges();
                break;

            case "onsale":
                var onsale = _db.OnSaleProperties.FirstOrDefault(m => m.Id == id);
                onsale.IsActive = false;
                _db.SaveChanges();
                break;

            case "industrial":
                var industrial = _db.CommercialProperties.FirstOrDefault(m => m.Id == id);
                industrial.IsActive = false;
                _db.SaveChanges();
                break;

            case "landproperty":
                var landproperty = _db.LandProperties.FirstOrDefault(m => m.Id == id);
                landproperty.IsActive = false;
                _db.SaveChanges();
                break;

            default:
                break;
            }
        }
        public ActionResult Create([Bind(Include = "AddressID,House,StreetName,TownName,Postcode,County")] Address address)
        {
            if (ModelState.IsValid)
            {
                db.Addresses.Add(address);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(address));
        }
        public ActionResult Create([Bind(Include = "PropertyID,Name,Description,Price,Category,AvailableDate,EstateAgent,Bedrooms,AddressID,PetsAllowed,IsShared")] Property property)
        {
            if (ModelState.IsValid)
            {
                db.Properties.Add(property);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(property));
        }
        public ActionResult Create([Bind(Include = "PropertyImageID,ImageURL,Description,Caption,ImageFormat,Rooms,PropertyID")] PropertyImage propertyImage)
        {
            if (ModelState.IsValid)
            {
                db.PropertyImages.Add(propertyImage);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.PropertyID = new SelectList(db.Properties, "PropertyID", "Name", propertyImage.PropertyID);
            return(View(propertyImage));
        }
Exemplo n.º 7
0
        public ActionResult Create([Bind(Include = "CustomerID,FirstName,Surname,MaritalStatus,ContactNumber,EmailAddress,DateOfBirth,AddressID")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                db.Customers.Add(customer);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AddressID = new SelectList(db.Addresses, "AddressID", "House", customer.AddressID);
            return(View(customer));
        }
Exemplo n.º 8
0
 public void AddUser(User model)
 {
     using (var db = new PropertyDbContext())
     {
         model.UserInsertDate = DateTime.Now;
         db.Users.Add(model);
         db.SaveChanges();
     }
 }
Exemplo n.º 9
0
        public ActionResult Save(ListPropertyViewModel model)
        {
            var property = new Property
            {
                Address     = model.Address,
                YearBuilt   = model.YearBuilt,
                MonthlyRent = model.MonthlyRent,
                ListPrice   = model.ListPrice,
                GrossYield  = model.GrossYield
            };

            using (_context)
            {
                _context.Properties.Add(property);
                _context.SaveChanges();
            }

            return(Json(model));
        }
Exemplo n.º 10
0
        public string Create([Bind("FirstName", "LastName", "Phone", "Email", "ImageUrl", "Hospital")] Doctor doctor)
        {
            string msg;

            try
            {
                if (ModelState.IsValid)
                {
                    msg = " jqDoctor Saved Successfully1";
                    _context.Doctors.Add(doctor);
                    _context.SaveChanges();
                    msg = "Saved Successfully2";
                }
                else
                {
                    msg = "Validation data not successfull";
                }
            }
            catch (Exception ex)
            {
                msg = "Error occured:" + ex.Message;
            }
            return(msg);
        }
Exemplo n.º 11
0
        public string Create([Bind("pBrokerageName", "Street", "City", "PostalCode", "Phone", "Website")] pBrokerage _pBrokerage)
        {
            string msg;

            try
            {
                if (ModelState.IsValid)
                {
                    msg = "Brokerage Saved Successfully";
                    _context.pBrokerage.Add(_pBrokerage);
                    _context.SaveChanges();
                    msg = "Saved Successfully2";
                }
                else
                {
                    msg = "Validation data not successfull";
                }
            }
            catch (Exception ex)
            {
                msg = "Error occured:" + ex.Message;
            }
            return(msg);
        }
Exemplo n.º 12
0
        public string Create([Bind("HospitalName", "Street", "City", "PostalCode", "Phone", "Email", "Website")] Hospital hospital)
        {
            string msg;

            try
            {
                if (ModelState.IsValid)
                {
                    msg = " Address Saved Successfully1";
                    _context.Hospitals.Add(hospital);
                    _context.SaveChanges();
                    msg = "Saved Successfully2";
                }
                else
                {
                    msg = "Validation data not successfull";
                }
            }
            catch (Exception ex)
            {
                msg = "Error occured:" + ex.Message;
            }
            return(msg);
        }
Exemplo n.º 13
0
        public string Create([Bind("FirstName", "LastName", "Phone", "Email", "ImageUrl", "pBrokerage")] pBroker _pBroker)
        {
            string msg;

            try
            {
                if (ModelState.IsValid)
                {
                    msg = "pBroker Saved Successfully";
                    _context.pBroker.Add(_pBroker);
                    _context.SaveChanges();
                    msg = "Saved Successfully2";
                }
                else
                {
                    msg = "Validation data not successfull";
                }
            }
            catch (Exception ex)
            {
                msg = "Error occured:" + ex.Message;
            }
            return(msg);
        }
Exemplo n.º 14
0
        public void CreateSubscription(string loginId, Plan plan, string email)
        {
            switch (plan)
            {
            case Plan.Business:
                _db.SubModels.Add(new SubModel {
                    LoginId       = loginId,
                    Plan          = plan,
                    DueDate       = DateTime.Now.AddDays(30).ToString(),
                    PropertyLimit = 20,
                    Email         = email
                });
                _db.SaveChanges();
                break;

            case Plan.Pro:
                _db.SubModels.Add(new SubModel {
                    LoginId       = loginId,
                    Plan          = plan,
                    DueDate       = DateTime.Now.AddDays(30).ToString(),
                    PropertyLimit = 40,
                    Email         = email
                });
                _db.SaveChanges();
                break;

            case Plan.Premium:
                _db.SubModels.Add(new SubModel {
                    LoginId       = loginId,
                    Plan          = plan,
                    DueDate       = DateTime.Now.AddDays(30).ToString(),
                    PropertyLimit = int.MaxValue,
                    Email         = email
                });
                _db.SaveChanges();
                break;

            default:
                break;
            }
        }
Exemplo n.º 15
0
        public static void SeedProperty(this IApplicationBuilder app)
        {
            //--- Dependency injection (DI) inside
            #region pBrokerage
            _context.pBrokerage.AddRange
            (
                new pBrokerage {
                pBrokerageName = "Royal LePage Real Estate Services Ltd.", Street = "1500 Royal York Rd.", City = "Toronto", PostalCode = "M9P 3B6", Phone = "(416) 245-9933", Website = "http://www.royallepage.ca/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Sutton Group Security Real Estate Inc.", Street = "1881 Steels Ave. W", City = "Toronto", PostalCode = "M3H 5Y4", Phone = "(416) 300-3459", Website = "http://www.suttongroupsecurityrealestate.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "RE/MAX Realtron Inc.", Street = "183 Willowdale Ave.", City = "Toronto", PostalCode = "M2N 4Y9", Phone = "(416) 222-8600", Website = "http://www.realtronhomes.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "HomeLife/Realty One Ltd.", Street = "501 Parliament St.", City = "Toronto", PostalCode = "M4X 1P3", Phone = "(416) 922-5533", Website = "http://www.homeliferealtyone.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Century 21 Real Estate LLC.", Street = "49 Holland St. W", City = "Toronto", PostalCode = "L3Z 2B6", Phone = "(905) 775-5677", Website = "http://www.century21.ca/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Metro King Realty Inc.", Street = "113 Holland St. W", City = "Bradford West Gwillimbury", PostalCode = "L3Z 2B7", Phone = "(905) 895-2882", Website = "http://www.metrokingrealty.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Commonsense Network Brokerage", Street = "430 McNeilly Rd.", City = "Hamilton", PostalCode = "L8E 5E3", Phone = "(855) 999-9740", Website = "http://comfree.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Bosley Real Estate Ltd.", Street = "290 Merton St.", City = "Toronto", PostalCode = "M4S 1A9", Phone = "(416) 322-8000", Website = "http://www.torontorealtyblog.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Colliers International Inc.", Street = "245 Yorkland Bld.", City = "Toronto", PostalCode = "M2J 4W9", Phone = "(416) 492-0100", Website = "http://www.collierscanada.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Orange Square Realty Inc.", Street = "101 Duncan Mill Rd.", City = "Toronto", PostalCode = "M3B 1Z3", Phone = "(416) 840-6888", Website = "http://www.orangesquarerealty.com/", LastUpdated = DateTime.Now
            },
                new pBrokerage {
                pBrokerageName = "Search Realty Corp.", Street = "50 Village Centre Pl.", City = "Missisaga", PostalCode = "L4Z 1V9", Phone = "(877) 979-4979", Website = "http://www.searchrealty.ca/", LastUpdated = DateTime.Now
            }

            );
            _context.SaveChanges();
            #endregion

            #region pBroker
            _context.pBroker.AddRange
            (
                new pBroker {
                FirstName = "Rita", LastName = "Delicata", Phone = "(416)245-9933", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Rita_Delicata.jpg", pBrokerageId = 1, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Vladimir", LastName = "Krasnopolskey", Phone = "(416)300-3459", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Vladimir_Krasnopolskey.jpg", pBrokerageId = 2, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Vivian", LastName = "Shah", Phone = "(905)892-6643", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Vivian_Shah.jpg", pBrokerageId = 3, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Luigi", LastName = "Riccelli", Phone = "(416)798-7777", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Luigi_Riccelli.jpg", pBrokerageId = 4, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Debra", LastName = "Huetl", Phone = "(905)251-6166", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Debra_Huetl.jpg", pBrokerageId = 5, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Iftikhar", LastName = "Ahmad", Phone = "(416)671-3861", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Iftikhar_Ahmad.jpg", pBrokerageId = 6, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Lukas", LastName = "Lhotsky", Phone = "(855)999-9740", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Lukas_Lhotsky.jpg", pBrokerageId = 7, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Jonathan", LastName = "Van", Phone = "(905)513-8878", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Jonathan_Van.jpg", pBrokerageId = 1, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Eva", LastName = "Liu", Phone = "(416)840-6888", Email = "*****@*****.**", ImageUrl = "/Content/Images/Broker/Eva_Liu.jpg", pBrokerageId = 10, LastUpdated = DateTime.Now
            },
                new pBroker {
                FirstName = "Sterling", LastName = "Wong", Phone = "(877)979-4979", Email = "info(at)searchrealty.ca", ImageUrl = "/Content/Images/Broker/Sterling_Wong.jpg", pBrokerageId = 11, LastUpdated = DateTime.Now
            }

            );
            _context.SaveChanges();
            #endregion
        }
Exemplo n.º 16
0
 public void AddEmergencyProperty(EmergencyProperty emergencyProperty)
 {
     _db.EmergencyProperties.Add(emergencyProperty);
     _db.SaveChanges();
 }
 public void Add(PropertyDetails property)
 {
     _context.PropertyInfos.Add(property);
     _context.SaveChanges();
 }
Exemplo n.º 18
0
        public static void SeedData(this IApplicationBuilder app)
        {
            //--- Dependency injection (DI) inside

            #region Hospital
            _context.Hospitals.AddRange
            (

                //new Hospital { HospitalId = 1, HospitalName = "Baycrest Health Sciences", Street = "3560 Bathurst Street", City = "Toronto", PostalCode = "M6A 2E1", Phone = "416-785-2500", Email = "*****@*****.**", Website = "http://www.baycrest.org/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 2, HospitalName = "Centre for Addiction and Mental Health", Street = "1001 Queen Street W", City = "Toronto", PostalCode = "M6J 1H4", Phone = "416-595-6111", Email = "*****@*****.**", Website = "http://www.camh.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 3, HospitalName = "Mount Sinai Hospital", Street = "600 University Avenue", City = "Toronto", PostalCode = "M5G 1X5", Phone = "416-596-4200", Email = "*****@*****.**", Website = "http://www.mountsinai.on.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 4, HospitalName = "North York General Hospital", Street = "4001 Leslie Street E", City = "Toronto", PostalCode = "M2K 1E1", Phone = "416-756-6507", Email = "*****@*****.**", Website = "http://www.nygh.on.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 5, HospitalName = "Markham Stouffville", Street = "381 Church Street", City = "Markham", PostalCode = "L3P 7P3", Phone = "905-472-7000", Email = "*****@*****.**", Website = "http://www.msh.on.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 6, HospitalName = "Rouge Valley Centenary", Street = "2867 Ellesmere Rd, Scarborough", City = "Scarborough", PostalCode = "M1E 4B9", Phone = "416-284-8131", Email = "*****@*****.**", Website = "http://www.rougevalley.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 7, HospitalName = "Bridgepoint Health", Street = "14 St Matthews Rd", City = "Toronto", PostalCode = "M4M 2B5", Phone = "416-461-8251", Email = "*****@*****.**", Website = "http://www.bridgepointhealth.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 8, HospitalName = "Trillium Health Partners", Street = "2200 Eglinton Ave W", City = "Mississauga", PostalCode = "L5M 2N1", Phone = "905-813-2200", Email = "*****@*****.**", Website = "http://trilliumhealthpartners.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 9, HospitalName = "Humber River Hospital", Street = "2111 Finch Ave W", City = "North York", PostalCode = "M3N 1N1", Phone = "416-744-2500", Email = "*****@*****.**", Website = "http://www.hrh.ca/", LastUpdated = DateTime.Now },
                //new Hospital { HospitalId = 10, HospitalName = "Shouldice Hospital", Street = "7750 Bayview Avenue", City = "Thornhill", PostalCode = "M3N 1N1", Phone = "289-807-0024", Email = "*****@*****.**", Website = "http://www.shouldice.com/", LastUpdated = DateTime.Now }

                new Hospital {
                HospitalName = "Baycrest Health Sciences", Street = "3560 Bathurst Street", City = "Toronto", PostalCode = "M6A 2E1", Phone = "416-785-2500", Email = "*****@*****.**", Website = "http://www.baycrest.org/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Centre for Addiction and Mental Health", Street = "1001 Queen Street W", City = "Toronto", PostalCode = "M6J 1H4", Phone = "416-595-6111", Email = "*****@*****.**", Website = "http://www.camh.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Mount Sinai Hospital", Street = "600 University Avenue", City = "Toronto", PostalCode = "M5G 1X5", Phone = "416-596-4200", Email = "*****@*****.**", Website = "http://www.mountsinai.on.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "North York General Hospital", Street = "4001 Leslie Street E", City = "Toronto", PostalCode = "M2K 1E1", Phone = "416-756-6507", Email = "*****@*****.**", Website = "http://www.nygh.on.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Markham Stouffville", Street = "381 Church Street", City = "Markham", PostalCode = "L3P 7P3", Phone = "905-472-7000", Email = "*****@*****.**", Website = "http://www.msh.on.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Rouge Valley Centenary", Street = "2867 Ellesmere Rd, Scarborough", City = "Scarborough", PostalCode = "M1E 4B9", Phone = "416-284-8131", Email = "*****@*****.**", Website = "http://www.rougevalley.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Bridgepoint Health", Street = "14 St Matthews Rd", City = "Toronto", PostalCode = "M4M 2B5", Phone = "416-461-8251", Email = "*****@*****.**", Website = "http://www.bridgepointhealth.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Trillium Health Partners", Street = "2200 Eglinton Ave W", City = "Mississauga", PostalCode = "L5M 2N1", Phone = "905-813-2200", Email = "*****@*****.**", Website = "http://trilliumhealthpartners.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Humber River Hospital", Street = "2111 Finch Ave W", City = "North York", PostalCode = "M3N 1N1", Phone = "416-744-2500", Email = "*****@*****.**", Website = "http://www.hrh.ca/", LastUpdated = DateTime.Now
            },
                new Hospital {
                HospitalName = "Shouldice Hospital", Street = "7750 Bayview Avenue", City = "Thornhill", PostalCode = "M3N 1N1", Phone = "289-807-0024", Email = "*****@*****.**", Website = "http://www.shouldice.com/", LastUpdated = DateTime.Now
            }
            );
            _context.SaveChanges();
            #endregion

            #region Doctor
            _context.Doctors.AddRange
            (
                //new Doctor { DoctorId = 1, FirstName = "Carson", LastName = "Alexander", Phone = "416-785-2500", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr1.jpg", HospitalId_FK = 1, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 2, FirstName = "Meredith", LastName = "Alonso", Phone = "416-494-2120", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr2.jpg", HospitalId_FK = 2, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 3, FirstName = "Arturo", LastName = "Anandy", Phone = "905-586-8203", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr3.jpg", HospitalId_FK = 3, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 4, FirstName = "Gytisy", LastName = "Barzdukas", Phone = "416-655-2532", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr4.jpg", HospitalId_FK = 4, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 5, FirstName = "Yany", LastName = "Li", Phone = "905-438-2911", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr5.jpg", HospitalId_FK = 5, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 6, FirstName = "Peggy", LastName = "Justice", Phone = "416-472-7000", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr6.jpg", HospitalId_FK = 6, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 7, FirstName = "Laura", LastName = "Norman", Phone = "905-756-6000", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr7.jpg", HospitalId_FK = 7, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 8, FirstName = "Nike", LastName = "Saman", Phone = "416-756-0066", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr8.jpg", HospitalId_FK = 8, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 9, FirstName = "Tom", LastName = "Cruise", Phone = "905-756-6000", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr9.jpg", HospitalId_FK = 9, Subscribers = null, Services = null, LastUpdated = DateTime.Now },
                //new Doctor { DoctorId = 10, FirstName = "Nikole", LastName = "Kidman", Phone = "416-756-0066", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr10.jpg", HospitalId_FK = 10, Subscribers = null, Services = null, LastUpdated = DateTime.Now }
                new Doctor {
                FirstName = "Carson", LastName = "Alexander", Phone = "416-785-2500", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr1.jpg", HospitalId = 1, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Meredith", LastName = "Alonso", Phone = "416-494-2120", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr2.jpg", HospitalId = 2, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Arturo", LastName = "Anandy", Phone = "905-586-8203", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr3.jpg", HospitalId = 3, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Gytisy", LastName = "Barzdukas", Phone = "416-655-2532", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr4.jpg", HospitalId = 4, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Yany", LastName = "Li", Phone = "905-438-2911", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr5.jpg", HospitalId = 5, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Peggy", LastName = "Justice", Phone = "416-472-7000", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr6.jpg", HospitalId = 6, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Laura", LastName = "Norman", Phone = "905-756-6000", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr7.jpg", HospitalId = 7, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Nike", LastName = "Saman", Phone = "416-756-0066", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr8.jpg", HospitalId = 8, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Tom", LastName = "Cruise", Phone = "905-756-6000", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr9.jpg", HospitalId = 9, LastUpdated = DateTime.Now
            },
                new Doctor {
                FirstName = "Nikole", LastName = "Kidman", Phone = "416-756-0066", Email = "*****@*****.**", ImageUrl = "/Content/Images/Photos/Dr10.jpg", HospitalId = 10, LastUpdated = DateTime.Now
            }

            );
            _context.SaveChanges();
            #endregion
        }
Exemplo n.º 19
0
 public void Add(SaleDetails sale)
 {
     _context.SaleInfo.Add(sale);
     _context.SaveChanges();
 }