示例#1
0
 internal static void ToOrmUser(DalUser daluser, OrmUser inThisOrmUser)
 {
     inThisOrmUser.Password = daluser.Password;
     inThisOrmUser.Name = daluser.Name;
     inThisOrmUser.Id = daluser.Id;
     inThisOrmUser.Email = daluser.Email;
     inThisOrmUser.TimeRegister = daluser.TimeRegister;
 }
示例#2
0
 internal static BllUser ToBllUser(DalUser daluser)
 {
     if (daluser!=null) return new BllUser()
         {
             Password = daluser.Password,
             Name = daluser.Name,
             Id = daluser.Id,
             Email = daluser.Email,
             TimeRegister = daluser.TimeRegister
         };
     return null;
 }
示例#3
0
 public void Update(DalUser daluser)
 {
     Maper.ToOrmUser(daluser, context.Set<OrmUser>().Where(dbuser => dbuser.Id == daluser.Id).FirstOrDefault());
 }
示例#4
0
 public void Create(DalUser daluser)
 {
     int roleid=2;
     context.Set<OrmRole>().Where(db => db.Id == roleid).FirstOrDefault().OrmUsers.Add(Maper.ToOrmUser(daluser));
 }
示例#5
0
 public bool GetByPasswordEmail(DalUser daluser)
 {
     return context.Set<OrmUser>().FirstOrDefault(dbuser => daluser.Name == dbuser.Name && daluser.Email == dbuser.Email && daluser.Password == dbuser.Password) != null;
 }
示例#6
0
 public void Delete(DalUser daluser)
 {
     throw new NotImplementedException();
 }