/// <summary> /// 修改 /// </summary> /// <param name="model"></param> /// <returns></returns> public static int Update(Login_Info model) { user_model Umodel = new user_model(); Umodel.Entry(model).State = System.Data.Entity.EntityState.Modified; return(Umodel.SaveChanges()); }
/// <summary> /// 添加 /// </summary> /// <param name="model"></param> /// <returns></returns> public static int AddUser(Login_Info model) { user_model Umodel = new user_model(); Umodel.Login_Info.Add(model); return(Umodel.SaveChanges()); }
public static List <Login_Info> getlist() { user_model model = new user_model(); List <Login_Info> list = model.Login_Info.ToList(); return(list); }
public object GetPageData(SearchModel <Login_Info> search, out int count) { GetPageListParameter <Login_Info, int> par = new GetPageListParameter <Login_Info, int>(); par.isAsc = true; par.orderByLambda = t => t.UserId; par.pageIndex = search.PageIndex; par.pageSize = search.PageSize; par.whereLambda = t => t.UserId != 0; user_model Instance = new user_model(); DBBaseService baseService = new DBBaseService(Instance); List <Login_Info> list = baseService.GetSimplePagedData <Login_Info, int>(par, out count); return(list); }
/// <summary> /// 查询角色表 /// </summary> /// <returns></returns> public static List <Login_role> Roleslist() { user_model Umodel = new user_model(); return(Umodel.Login_role.ToList()); }
/// <summary> /// 根据id详情 /// </summary> /// <param name="UserId"></param> /// <returns></returns> public static Login_Info details(int id) { user_model Umodel = new user_model(); return(Umodel.Login_Info.FirstOrDefault(p => p.UserId == id)); }
public fenye() { this.context = new user_model(); }