Base solution for your next web application

Activities of "agmachado"

Hi robmarsh00 Did you find any solution? can you share it? Thank you

Question

Hi, I play with the Layout Builder of Metronicv5.0.5 <a class="postlink" href="http://keenthemes.com/metronic/preview/?page=builder">http://keenthemes.com/metronic/preview/?page=builder</a>, but I need the purchase code to download.

where can i find the purchase code?

Kind Regards

your indications worked Thank you

How can I disable the swagger ui in a production environment?

Yes

[AutoMapFrom(typeof(CampoModulo))] [AutoMapTo(typeof(CampoModulo))] public class CamposEnModuloEditDto ....

[AutoMapFrom(typeof(CampoModulo))] [AutoMapTo(typeof(CampoModulo))] public class CamposEnModuloEditDto ......

Thank for your reply ismcagdas

My reduced sample code:

public class ModuloPl : Entity { public virtual string Nombre { get; protected set; } public virtual string Html { get; set; } public ICollection<CampoModulo> Campos { get; set; } .... }

public class CampoModulo : Entity { public virtual string Nombre { get; set; } public virtual string Marca { get; set; } public virtual bool Requerido { get; set; } .... }

public class ModuloPlEditDto { public virtual int? Id { get; set; } public virtual string Nombre { get; set; } public virtual string Html { get; set; } public Collection<CamposEnModuloEditDto> Campos { get; set; } }

public class CamposEnModuloEditDto { public virtual int? Id { get; set; } public string Nombre { get; set; } public string Marca { get; set; } public bool Requerido { get; set; } }

private async Task<ModuloPl> GetModuloByIdAsync(int moduloId) { var modulopl = await _moduloRepository.GetAll() .Include(p => p.Campos) .Include(p => p.imagen) .Include(p => p.imagen.Ubicacion) .Where(p => p.Id == moduloId).SingleAsync();

if (modulopl == null)
{
    throw new Abp.UI.UserFriendlyException("No existe ningún módulo con id: " + moduloId);
}

return modulopl;

}

Now, in runtime, the user add a new CamposEnModuloEditDto in a existing ModuloPlEditDto

ModuloPlEditDto input; // this DTO is mapped from a existting entity CamposEnModuloEditDto newCampo = new CamposEnModuloEditDto(); newCampo.Nombre = "name"; newCampo.Marca = "Html"; newCampo.Requerido = True; input.Campos.Add(newCampo);

and calll to UpdateModuloPl(ModuloPlEditDto input)

[AbpAuthorize(AppPermissions.Pages_Administration_TAuxiliares)] public async Task UpdateModuloPl(ModuloPlEditDto input) {

 var oldmodulopl = await GetModuloByIdAsync(input.Id.Value);

ObjectMapper.Map(input, oldmodulopl);

await _moduloRepository.UpdateAsync(oldmodulopl);

}

Mvc.ExceptionHandling.AbpExceptionFilter - The instance of entity type 'CampoModulo' cannot be tracked because another instance of this type with the same key is already being tracked. When adding new entities, for most key types a unique temporary key value will be created if no key is set (i.e. if the key property is assigned the default value for its type). If you are explicitly setting key values for new entities, ensure they do not collide with existing entities or temporary values generated for other new entities. When attaching existing entities, ensure that only one entity instance with a given key value is attached to the context. System.InvalidOperationException: The instance of entity type 'CampoModulo' cannot be tracked because another instance of this type with the same key is already being tracked. When adding new entities, for most key types a unique temporary key value will be created if no key is set (i.e. if the key property is assigned the default value for its type). If you are explicitly setting key values for new entities, ensure they do not collide with existing entities or temporary values generated for other new entities. When attaching existing entities, ensure that only one entity instance with a given key value is attached to the context. en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.IdentityMap1.Add(TKey key, InternalEntityEntry entry) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.IdentityMap1.Add(InternalEntityEntry entry) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.StartTracking(InternalEntityEntry entry) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntry.SetEntityState(EntityState oldState, EntityState newState, Boolean acceptChanges) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntry.SetEntityState(EntityState entityState, Boolean acceptChanges) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntityGraphAttacher.PaintAction(EntityEntryGraphNode node) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntityEntryGraphIterator.TraverseGraph(EntityEntryGraphNode node, Func2 handleNode) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.EntityGraphAttacher.AttachGraph(InternalEntityEntry rootEntry, EntityState entityState) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.NavigationFixer.NavigationCollectionChanged(InternalEntityEntry entry, INavigation navigation, IEnumerable1 added, IEnumerable1 removed) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntryNotifier.NavigationCollectionChanged(InternalEntityEntry entry, INavigation navigation, IEnumerable1 added, IEnumerable1 removed) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.ChangeDetector.DetectNavigationChange(InternalEntityEntry entry, INavigation navigation) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.ChangeDetector.DetectChanges(InternalEntityEntry entry) en Microsoft.EntityFrameworkCore.ChangeTracking.Internal.ChangeDetector.DetectChanges(IStateManager stateManager) en Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.DetectChanges() en Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.Entries() en Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.AttachIfNot(TEntity entity) en Castle.Proxies.EfCoreRepositoryBase2Proxy_4.AttachIfNot_callback(ModuloPl entity) en Castle.Proxies.Invocations.EfCoreRepositoryBase3_AttachIfNot_27.InvokeMethodOnTarget() en Castle.DynamicProxy.AbstractInvocation.Proceed() en Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) en Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) en Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) en Castle.DynamicProxy.AbstractInvocation.Proceed() en Castle.Proxies.EfCoreRepositoryBase2Proxy_4.AttachIfNot(ModuloPl entity) en Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.UpdateAsync(TEntity entity) en Castle.Proxies.EfCoreRepositoryBase2Proxy_4.UpdateAsync_callback(ModuloPl entity) en Castle.Proxies.Invocations.EfCoreRepositoryBase3_UpdateAsync_27.InvokeMethodOnTarget() en Castle.DynamicProxy.AbstractInvocation.Proceed() en Abp.Domain.Uow.UnitOfWorkInterceptor.PerformAsyncUow(IInvocation invocation, UnitOfWorkOptions options) en Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) en Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) en Castle.DynamicProxy.AbstractInvocation.Proceed() en Castle.Proxies.EfCoreRepositoryBase`2Proxy_4.UpdateAsync(ModuloPl entity) en icaCronos.Plantilla.ModuloPlAppService.

Question

Hi. How can I get automapper to run collections to automatically update one-to-many relationships?

Hi ismcagdas

Thanks for your reply

Authentication / permission check is not required because is a local service but i would like use the same database that i defined in myproject.EntityFrameworkCore and the same librarys classes and methods defined in myproject.Application and myproject.Core

I would like use localization and time zone settings too

Thanks

Hi. Is it possible to get an updated version of the example that you are referring in this post?

I am trying to create a standalone windows service that uses abp to get list of Entity's and send email Thanks

Showing 1 to 9 of 9 entries