예제 #1
0
파일: User_dal.cs 프로젝트: lizhongyv/zxyl
        /// <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());
        }
예제 #2
0
파일: User_dal.cs 프로젝트: lizhongyv/zxyl
        /// <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());
        }