public ActionResult GetAll() { var db = new CATSEntities(); Translation.Service.Translater converter = new Service.Translater(); converter.GetForText("", ""); return(View(db.Translations.ToList())); }
//[HttpPost] public ActionResult Create(Translation.Models.CATSEntities translation) { try { using (var db = new CATSEntities()) { //db.Translations.add(translation); db.SaveChanges(); } return(RedirectToAction("Index")); } catch { return(View()); } }
// Initialize and open the database connection static DatabaseManager() { entities = new CATSEntities(); entities.Database.Connection.Open(); }