public void CleanDatabase() { using (var db = new team12Entities()) { // db.OrderLines.RemoveRange(db.OrderLines); // db.Orders.RemoveRange(db.Orders); // db.PROPERTies.RemoveRange(db.PROPERTies); // db.SaveChanges(); } }
public void ClickDetail(string propertyName) { var db = new team12Entities(); int id = db.PROPERTies.FirstOrDefault(r => r.PropertyName == propertyName).ID; using (var controller = new ProjectController()) { _result = controller.Detail(id); } }