// for login (with matching name from the database) public Customer Authinticate(string firstName, string lastName) { var db = new MarinaEntities(); var auth = db.Customers.FirstOrDefault(c => c.FirstName == firstName && c.LastName == lastName); return(auth); }
//Slip public IList <Slip> GetSlip() { var db = new MarinaEntities(); var slp = db.Slips.ToList(); return(slp); }
//Lease slip public IList <Lease> GetLeaseSlip() { var db = new MarinaEntities(); var lesSlp = db.Leases.ToList(); return(lesSlp); }
//Dock public IList <Dock> GetDock() { var db = new MarinaEntities(); var dock = db.Docks.ToList(); return(dock); }
//Saving lease public void SaveLease(int custId, int slipId) { var db = new MarinaEntities(); Lease L = new Lease(); L.CustomerID = custId; L.SlipID = slipId; db.Leases.Add(L); db.SaveChanges(); }