private void Validate(RepositoryExtensionFactory.ModuleEventAgrs e) { if (e.Action == RepositoryExtensionFactory.ApiActionType.Post || e.Action == RepositoryExtensionFactory.ApiActionType.Put) { //if (e.Entity is Product) //{ // var pr = e.Entity as Product; // pr.Unit = "5"; //} } }
private void Validate(RepositoryExtensionFactory.ModuleEventAgrs e) { if (e.Action == RepositoryExtensionFactory.ApiActionType.Get || e.Action == RepositoryExtensionFactory.ApiActionType.GetAll) { return; } //if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated) //{ // return; //} //if (Thread.CurrentPrincipal.Identity.IsAuthenticated) //{ // return; //} e.Cancel = true; // var username = Thread.CurrentPrincipal.Identity.Name; // var username = Thread.CurrentPrincipal.Identity.IsAuthenticated; }
private void Validate(RepositoryExtensionFactory.ModuleEventAgrs e) { }