/// <summary> /// Translates an ITableStorageEntity to an IBusinessObjectEntity /// </summary> /// <param name="entity"></param> /// <returns></returns> public override IBusinessObjectEntity FromTableStorage(ITableStorageEntity entity) { BuildableItemTableStorage buildableItemTableStorage = (BuildableItemTableStorage)entity; switch ((BuildableItemCategory)buildableItemTableStorage.Category) { case BuildableItemCategory.Production: return Mapper .Map<BuildableItemTableStorage, ProductionItem>(buildableItemTableStorage); case BuildableItemCategory.Consumable: return Mapper .Map<BuildableItemTableStorage, ConsumableItem>(buildableItemTableStorage); case BuildableItemCategory.Work: return Mapper .Map<BuildableItemTableStorage, WorkItem>(buildableItemTableStorage); case BuildableItemCategory.Storage: return Mapper .Map<BuildableItemTableStorage, StorageItem>(buildableItemTableStorage); } return null; }
/// <summary> /// Translates an ITableStorageEntity to an IBusinessObjectEntity /// </summary> /// <param name="entity"></param> /// <returns></returns> public override IBusinessObjectEntity FromTableStorage(ITableStorageEntity entity) { return Mapper .Map<ExperienceLevelTableStorage, ExperienceLevel>( (ExperienceLevelTableStorage)entity); }
/// <summary> /// Translates an ITableStorageEntity to an IBusinessObjectEntity /// </summary> /// <param name="entity"></param> /// <returns></returns> public override IBusinessObjectEntity FromTableStorage(ITableStorageEntity entity) { return Mapper .Map<GamePlayerTableStorage, GamePlayer>( (GamePlayerTableStorage)entity); }
/// <summary> /// Translates an ITableStorageEntity to an IBusinessObjectEntity /// </summary> /// <param name="entity"></param> /// <returns></returns> public abstract IBusinessObjectEntity FromTableStorage(ITableStorageEntity entity);