Example #1
0
 /// <summary>
 /// Fetches MembershipIdentity from the server
 /// </summary>
 /// <param name="criteria"><see cref="MembershipIdentity.Criteria"/></param>
 /// <returns></returns>
 public MembershipIdentity Fetch(MembershipIdentity.Criteria criteria)
 {
   var config = ConfigurationManager.AppSettings["CslaMembershipUseWebServer"];
   if (string.IsNullOrEmpty(config)) config = "True";
   var useWebServer = bool.Parse(config);
   if (useWebServer)
   {
     var appFactory = new IdentityAppFactory();
     return appFactory.Fetch(criteria);
   }
   else
   {
     return Csla.DataPortal.Fetch<MembershipIdentity>(criteria);
   }
 }
Example #2
0
        /// <summary>
        /// Fetches MembershipIdentity from the server
        /// </summary>
        /// <param name="criteria"><see cref="MembershipIdentity.Criteria"/></param>
        /// <returns></returns>
        public MembershipIdentity Fetch(MembershipIdentity.Criteria criteria)
        {
            var config = ConfigurationManager.AppSettings["CslaMembershipUseWebServer"];

            if (string.IsNullOrEmpty(config))
            {
                config = "True";
            }
            var useWebServer = bool.Parse(config);

            if (useWebServer)
            {
                var appFactory = new IdentityAppFactory();
                return(appFactory.Fetch(criteria));
            }
            else
            {
                return(Csla.DataPortal.Fetch <MembershipIdentity>(criteria));
            }
        }