public Customer GetCustomerByEmail(string email) { db = new PosDbContext(); var student = db.Customers.FirstOrDefault(std => std.Email == email); return(student); }
public bool Insert(Customer customer) { db = new PosDbContext(); db.Customers.Add(customer); return(db.SaveChanges() > 0); }