Example #1
0
 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
         ;
 }
Example #3
0
 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;
 }
Example #5
0
        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>
 }
Example #7
0
 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);
 }
Example #8
0
 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>
 }
 public static bool AreEqual(this ILocationAliasModel model, ILocationAlias entity)
 {
     return Mapper.AreEqual(model, entity);
 }
Example #10
0
 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;
 }
Example #13
0
 public static ILocationAliasModel MapToModelListing(this ILocationAlias entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
Example #14
0
 public static bool AreEqual(this ILocationAliasModel model, ILocationAlias entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
Example #15
0
 public static void MapToEntity(this ILocationAliasModel model, ref ILocationAlias entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
Example #16
0
 public void Remove(ILocationAlias entity)
 {
     Context.LocationAliases.Remove((LocationAlias)entity);
 }
 public static void MapToEntity(this ILocationAliasModel model, ref ILocationAlias entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
Example #18
0
 public void Update(ILocationAlias entity)
 {
     Context.SetModified(entity);
 }
Example #19
0
 public void Deactivate(ILocationAlias entity)
 {
     entity.Active = false;
     Update(entity);
 }