protected bool Deactivate(ILocationAlias entity) { // Deactivate it LocationAliasesRepository.Deactivate(entity); // Try to Save Changes LocationAliasesRepository.SaveChanges(); // Finished! return(true); }
public virtual bool AreEqual(ILocationAliasModel model, ILocationAlias entity) { return NameableEntityMapper.AreEqual(model, entity) // LocationAlias Properties // <None> // Related Objects && model.LocationId == entity.LocationId ; }
public virtual bool AreEqual(ILocationAliasModel model, ILocationAlias entity) { return(NameableEntityMapper.AreEqual(model, entity) // LocationAlias Properties // <None> // Related Objects && model.LocationId == entity.LocationId ); }
public virtual ILocationAliasModel MapToModelListing(ILocationAlias entity, int currentDepth = 1) { currentDepth++; var model = NameableEntityMapper.MapToModelListing<ILocationAlias, LocationAliasModel>(entity); // LocationAlias Properties // <None> // Related Objects model.LocationId = entity.LocationId; // Return Entity return model; }
public virtual ILocationAliasModel MapToModelListing(ILocationAlias entity, int currentDepth = 1) { currentDepth++; var model = NameableEntityMapper.MapToModelListing <ILocationAlias, LocationAliasModel>(entity); // LocationAlias Properties // <None> // Related Objects model.LocationId = entity.LocationId; // Return Entity return(model); }
public virtual void MapToEntity(ILocationAliasModel model, ref ILocationAlias entity, int currentDepth = 1) { currentDepth++; // Assign Base properties NameableEntityMapper.MapToEntity(model, ref entity); // LocationAlias Properties // <None> // Related Objects entity.LocationId = model.LocationId; entity.Location = (Location)model.Location?.MapToEntity(); // Associated Objects // <None> }
protected bool Remove(ILocationAlias entity) { if (entity == null) { return(true); } // No entity found to remove, consider it passed // Remove it LocationAliasesRepository.Remove(entity); // Try to Save Changes LocationAliasesRepository.SaveChanges(); // Finished! return(true); }
public static bool AreEqual(this ILocationAliasModel model, ILocationAlias entity) { return Mapper.AreEqual(model, entity); }
public void Add(ILocationAlias entity) { Context.LocationAliases.Add((LocationAlias)entity); }
protected bool Remove(ILocationAlias entity) { if (entity == null) { return true; } // No entity found to remove, consider it passed // Remove it LocationAliasesRepository.Remove(entity); // Try to Save Changes LocationAliasesRepository.SaveChanges(); // Finished! return true; }
protected bool Deactivate(ILocationAlias entity) { // Deactivate it LocationAliasesRepository.Deactivate(entity); // Try to Save Changes LocationAliasesRepository.SaveChanges(); // Finished! return true; }
public static ILocationAliasModel MapToModelListing(this ILocationAlias entity, int currentDepth = 1) { return(Mapper.MapToModelListing(entity, currentDepth)); }
public static bool AreEqual(this ILocationAliasModel model, ILocationAlias entity) { return(Mapper.AreEqual(model, entity)); }
public static void MapToEntity(this ILocationAliasModel model, ref ILocationAlias entity, int currentDepth = 1) { Mapper.MapToEntity(model, ref entity, currentDepth); }
public void Remove(ILocationAlias entity) { Context.LocationAliases.Remove((LocationAlias)entity); }
public void Update(ILocationAlias entity) { Context.SetModified(entity); }
public void Deactivate(ILocationAlias entity) { entity.Active = false; Update(entity); }