public Calisanlar idAl(string username) { using (var context = new CarRentalAppContext()) { // context.Database.Connection.Open(); var result = context.Calisanlar.FirstOrDefault(x => x.KullaniciAdi == username); if (result == null) { throw new AuthenticationException("Kullanıcı Girişi Başarısız !"); } return(result); } }
public bool sifreKontrol(string username, string pass) { using (var context = new CarRentalAppContext()) { var isUserValid = context.Calisanlar.FirstOrDefault(x => x.KullaniciAdi == username && x.Sifre == pass); if (isUserValid != null) { return(true); } else { return(false); } } }
public static Musteriler UserMusteriLogin(Musteriler modelUser) { if (string.IsNullOrEmpty(Convert.ToString(modelUser.KullaniciAdi)) && string.IsNullOrEmpty(modelUser.Sifre)) { throw new AuthenticationException("Kullanici Verileri Boş Geçilemez !"); } using (var context = new CarRentalAppContext()) { var result = context.Musteriler.FirstOrDefault(x => x.KullaniciAdi == modelUser.KullaniciAdi && x.Sifre == modelUser.Sifre); if (result == null) { throw new AuthenticationException("Kullanıcı Girişi Başarısız !"); } return(result); } }
public static Calisanlar UserAdminLogin(Calisanlar modelUser) { if (string.IsNullOrEmpty(Convert.ToString(modelUser.KullaniciAdi)) && string.IsNullOrEmpty(modelUser.Sifre)) { throw new AuthenticationException("Kullanici Verileri Boş Geçilemez !"); } using (var context = new CarRentalAppContext()) { // context.Database.Connection.Open(); var result = context.Calisanlar.FirstOrDefault(x => x.KullaniciAdi == modelUser.KullaniciAdi && x.Sifre == modelUser.Sifre); if (result == null) { throw new AuthenticationException("Kullanıcı Girişi Başarısız !"); } return(result); } }
public CarService(CarRentalAppContext context, IMapper mapper) { this.context = context; this.mapper = mapper; }
public ClassificationRepository(CarRentalAppContext context) : base(context) { }
public RoleRepository(CarRentalAppContext context) : base(context) { }
public BillRepository(CarRentalAppContext context) : base(context) { }
public ClientRepository(CarRentalAppContext context) : base(context) { }