Exemple #1
0
        /// <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());
        }
Exemple #2
0
        /// <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());
        }