protected bool Deactivate(IOriginProfile entity) { // Deactivate it OriginProfilesRepository.Deactivate(entity); // Try to Save Changes OriginProfilesRepository.SaveChanges(); // Finished! return(true); }
public virtual bool AreEqual(IOriginProfileModel model, IOriginProfile entity) { return EntityMapper.AreEqual(model, entity) // OriginProfile Properties // <None> // Related Objects && model.OriginId == entity.OriginId && model.ProfileId == entity.ProfileId ; }
public virtual bool AreEqual(IOriginProfileModel model, IOriginProfile entity) { return(EntityMapper.AreEqual(model, entity) // OriginProfile Properties // <None> // Related Objects && model.OriginId == entity.OriginId && model.ProfileId == entity.ProfileId ); }
protected bool Remove(IOriginProfile entity) { if (entity == null) { return(true); } // No entity found to remove, consider it passed // Remove it OriginProfilesRepository.Remove(entity); // Try to Save Changes OriginProfilesRepository.SaveChanges(); // Finished! return(true); }
public virtual IOriginProfileModel MapToModelListing(IOriginProfile entity, int currentDepth = 1) { currentDepth++; var model = EntityMapper.MapToModelListing <IOriginProfile, OriginProfileModel>(entity); // OriginProfile Properties // <None> // Related Objects model.OriginId = entity.OriginId; model.ProfileId = entity.ProfileId; // Return Entity return(model); }
public virtual void MapToEntity(IOriginProfileModel model, ref IOriginProfile entity, int currentDepth = 1) { currentDepth++; // Assign Base properties EntityMapper.MapToEntity(model, ref entity); // OriginProfile Properties // <None> // Related Objects entity.OriginId = model.OriginId; entity.Origin = (Origin)model.Origin?.MapToEntity(); entity.ProfileId = model.ProfileId; entity.Profile = (Profile)model.Profile?.MapToEntity(); // Associated Objects // <None> }
public virtual IOriginProfileModel MapToModel(IOriginProfile entity, int currentDepth = 1) { currentDepth++; var model = EntityMapper.MapToModel<IOriginProfile, OriginProfileModel>(entity); // OriginProfile Properties // <None> // Related Objects model.OriginId = entity.OriginId; model.Origin = entity.Origin?.MapToModel(); model.ProfileId = entity.ProfileId; model.Profile = entity.Profile?.MapToModel(); // Associated Objects // <None> // Return Entity return model; }
public void Add(IOriginProfile entity) { Context.OriginProfiles.Add((OriginProfile)entity); }
public static bool AreEqual(this IOriginProfileModel model, IOriginProfile entity) { return Mapper.AreEqual(model, entity); }
public void Update(IOriginProfile entity) { Context.SetModified(entity); }
public void Deactivate(IOriginProfile entity) { entity.Active = false; Update(entity); }
public void Remove(IOriginProfile entity) { Context.OriginProfiles.Remove((OriginProfile)entity); }
protected bool Remove(IOriginProfile entity) { if (entity == null) { return true; } // No entity found to remove, consider it passed // Remove it OriginProfilesRepository.Remove(entity); // Try to Save Changes OriginProfilesRepository.SaveChanges(); // Finished! return true; }
public static bool AreEqual(this IOriginProfileModel model, IOriginProfile entity) { return(Mapper.AreEqual(model, entity)); }
public static void MapToEntity(this IOriginProfileModel model, ref IOriginProfile entity, int currentDepth = 1) { Mapper.MapToEntity(model, ref entity, currentDepth); }
public static IOriginProfileModel MapToModelListing(this IOriginProfile entity, int currentDepth = 1) { return(Mapper.MapToModelListing(entity, currentDepth)); }
protected bool Deactivate(IOriginProfile entity) { // Deactivate it OriginProfilesRepository.Deactivate(entity); // Try to Save Changes OriginProfilesRepository.SaveChanges(); // Finished! return true; }