public static int AddQuestion(Question model) { using (var entity = new BusEntities()) { var id = 0; try { entity.AddToQuestion(model); entity.SaveChanges(); id = model.ID; } catch { } return(id); } }
public static int AddQuestion(Question model) { using (var entity = new BusEntities()) { var id = 0; try { entity.AddToQuestion(model); entity.SaveChanges(); id = model.ID; } catch { } return(id); } }