public void UserRoleEczaneGrupRegister(User user, string ezaneGln, string eczaneMail, string eczaneAdi, int eczaneGrupId) { UserRole userRole = new UserRole(); EczaneUser eczaneUser = new EczaneUser(); EczaneGrup eczaneGrup = new EczaneGrup(); Eczane eczane = new Eczane(); eczane.Adi = eczaneAdi; eczane.EczaneGln = ezaneGln; eczane.Email = eczaneMail; eczaneGrup.GrupId = eczaneGrupId; eczaneGrup.BaslangicTarihi = DateTime.Now; _userDal.Insert(user); var myuser = GetByEmail(eczaneMail); userRole.UserId = myuser.Id; userRole.RoleId = 3; _userRoleDal.Insert(userRole); _eczaneDal.Insert(eczane); var myeczane = _eczaneDal.Get(x => x.EczaneGln == ezaneGln); eczaneUser.EczaneId = myeczane.Id; eczaneUser.UserId = myuser.Id; _eczaneUserDal.Insert(eczaneUser); eczaneGrup.EczaneId = myeczane.Id; _eczaneGrupDal.Insert(eczaneGrup); }
public void Insert(UserRole userRole) { _userRoleDal.Insert(userRole); }