예제 #1
0
        public Response LoginControl(User user)
        {
            try
            {
                using (AlacaYazilimWebSiteEntities entities = new AlacaYazilimWebSiteEntities())
                {
                    Kullanicilar kullanici = entities.Kullanicilar.FirstOrDefault(l => l.Email == user.EmailAddress && l.Sifre == user.Password && l.Aktif.Value);
                    if (kullanici == null)
                    {
                        return(MakeResponse.CreateErrorResponse("Kullanıcı bulunamadı!"));
                    }

                    user = Converter.Convert <Kullanicilar, User>(kullanici);
                    return(MakeResponse.CreateSuccessResponse(new object[] { user }));
                }
            }
            catch (Exception ex)
            {
                return(MakeResponse.CreateErrorResponse(ex));
            }
        }
예제 #2
0
파일: Core_MakeRsp.cs 프로젝트: jmclain/Nmp
		public void makersp( string rspPath, bool loadLibrary )
		{
			// ******
			var mr = new MakeResponse( mp );
			string dllPath = mr.Make( rspPath );

			// ******
			if( loadLibrary ) {
				ObjectMacros.LoadAssembly( dllPath );
			}
		}