Hi. How I can view hierarchy data with tree view in abp project with AngularJs like Zero project? Do you have any sample code?
Hi and thank you for your response. I update abp.* again and it work.
I create new project with asp.netBoilerplate abp and abp.web version are 7.3.0 but in project that I faced with problem abp and abp.web version are 7.4.0 therefore I use latest version but I received this error ".Mvc.Controllers.AbpHandleErrorAttribute - System.MissingMethodException: Method not found: 'Abp.Application.Features.IFeatureDependency Abp.Authorization.Permission.get_DependedFeature()'"
Thank you for your response. I cheeked all package and some of them has been upgrade to new version but I received error
Mvc.Controllers.AbpHandleErrorAttribute - System.MissingMethodException: Method not found: 'Abp.Application.Features.IFeatureDependency Abp.Authorization.Permission.get_DependedFeature()'.
in error log and also navigation system does not work properly (abp.nav is null)
Hi, after update to Version=0.7.3.0 I received this error ERROR 2015-11-09 08:46:34,251 [6 ] .Mvc.Controllers.AbpHandleErrorAttribute - System.TypeLoadException: Could not load type 'Abp.Json.JsonHelper' from assembly 'Abp, Version=0.7.3.0, Culture=neutral, PublicKeyToken=null'. at Abp.Web.Navigation.NavigationScriptManager.AppendMenu(StringBuilder sb, UserMenu menu) at Abp.Web.Navigation.NavigationScriptManager.<GetScriptAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)..... How can I resolve this problem?
Work like a charm. Thank you man :) ;)
Hi Every thing work correctly when I use "context.Manager.MainMenu" like this
context.Manager.MainMenu.AddItem(baseTable)
but when I add item to "context.Manager.Menus"
var md = new MenuDefinition("um", new LocalizableString("Persons", ISDConsts.LocalizationSourceName));
context.Manager.Menus.Add(new System.Collections.Generic.KeyValuePair<string, MenuDefinition>("test", md));
then "abp.nav" in java script file is null
<cite>hikalkan: </cite> Hi,
I will share a simplified version of AspNet Zero's registration code for you:
[HttpPost] [UnitOfWork] public virtual async Task<ActionResult> Register(RegisterViewModel model) { try { if (!_multiTenancyConfig.IsEnabled) { model.TenancyName = Tenant.DefaultTenantName; } else if (model.TenancyName.IsNullOrEmpty()) { throw new UserFriendlyException(L("TenantNameCanNotBeEmpty")); } var tenant = await GetTenantAsync(model.TenancyName); var user = new User { TenantId = tenant.Id, Name = model.Name, Surname = model.Surname, UserName = model.UserName, EmailAddress = model.EmailAddress, Password = new PasswordHasher().HashPassword(model.Password), IsActive = true }; _unitOfWorkManager.Current.EnableFilter(AbpDataFilters.MayHaveTenant); _unitOfWorkManager.Current.SetFilterParameter(AbpDataFilters.MayHaveTenant, AbpDataFilters.Parameters.TenantId, tenant.Id); user.Roles = new List<UserRole>(); foreach (var defaultRole in await _roleManager.Roles.Where(r => r.IsDefault).ToListAsync()) { user.Roles.Add(new UserRole { RoleId = defaultRole.Id }); } CheckErrors(await _userManager.CreateAsync(user)); await _unitOfWorkManager.Current.SaveChangesAsync(); //Directly login var loginResult = await GetLoginResultAsync(user.UserName, model.Password, tenant.TenancyName); if (loginResult.Result == AbpLoginResultType.Success) { await SignInAsync(loginResult.User, loginResult.Identity); return Redirect(Url.Action("Index", "Application")); } } catch (UserFriendlyException ex) { ViewBag.ErrorMessage = ex.Message; return View(model); } }
I hope this helps you and others.
I have this problem too. but I use SPA version with angularjs. Is your solution difference ? I cant find _multiTenancyConfig in application layer
Edit: I think AbpSession that injected to application service for this purpose?! Is it true?
hi. you use include extension method in application layer. Is this true solution to Add reference to EntityFramework.dll in Application layer? or we must add a method to repository for load data with related entities, for example
public IQuariable<Person> GetPersonWithRelatedObject(){
return GetAll().Include(p=>p.RelatedObject);
}
Hi, Suppose we have entities like this
public class DocHeader : Entity
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<DocDetail> DocDetails { get; set; }
}
public class DocDetail
{
public int Id { get; set; }
public byte Type { get; set; }
public int DocHeaderId { get; set; }
public int Value { get; set; }
[ForeignKey("DocHeaderId")]
public virtual DocHeader DocHeader { get; set; }
}
we have specific validation in Update method in DocHeaderApplicationService and want to validate based on details for current docheader. for example 1- value summaries in doc detail not to be grater than 30 2- user cant select detail with same [type] in DocHeader
how can I do this: 1- validate detail (this is not [â—¦Validating data transfer objects] this is [Validating Entity]) 2-passing validation erros to client 3-Where I place validation ? DomainService or in ApplicationService