public virtual bool AreEqual(IIssueWriterModel model, IIssueWriter entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // IssueWriter Properties
            // <None>
            // Related Objects
            && model.IssueId == entity.IssueId &&
            model.WriterId == entity.WriterId
            );
 }
 public virtual bool AreEqual(IIssueWriterModel model, IIssueWriter entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // IssueWriter Properties
         // <None>
         // Related Objects
         && model.IssueId == entity.IssueId
         && model.WriterId == entity.WriterId
         ;
 }
        public virtual IIssueWriterModel MapToModelListing(IIssueWriter entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <IIssueWriter, IssueWriterModel>(entity);

            // IssueWriter Properties
            // <None>
            // Related Objects
            model.IssueId  = entity.IssueId;
            model.WriterId = entity.WriterId;
            // Return Entity
            return(model);
        }
 public virtual void MapToEntity(IIssueWriterModel model, ref IIssueWriter entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // IssueWriter Properties
     // <None>
     // Related Objects
     entity.IssueId = model.IssueId;
     entity.Issue = (Issue)model.Issue?.MapToEntity();
     entity.WriterId = model.WriterId;
     entity.Writer = (Person)model.Writer?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual IIssueWriterModel MapToModel(IIssueWriter entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<IIssueWriter, IssueWriterModel>(entity);
     // IssueWriter Properties
     // <None>
     // Related Objects
     model.IssueId = entity.IssueId;
     model.Issue = entity.Issue?.MapToModel();
     model.WriterId = entity.WriterId;
     model.Writer = entity.Writer?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 protected bool Deactivate(IIssueWriter entity)
 {
     // Deactivate it
     IssueWritersRepository.Deactivate(entity);
     // Try to Save Changes
     IssueWritersRepository.SaveChanges();
     // Finished!
     return true;
 }
 public static bool AreEqual(this IIssueWriterModel model, IIssueWriter entity)
 {
     return Mapper.AreEqual(model, entity);
 }
 public static void MapToEntity(this IIssueWriterModel model, ref IIssueWriter entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static void MapToEntity(this IIssueWriterModel model, ref IIssueWriter entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static IIssueWriterModel MapToModelListing(this IIssueWriter entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
 public void Update(IIssueWriter entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(IIssueWriter entity)
 {
     Context.IssueWriters.Remove((IssueWriter)entity);
 }
 public void Deactivate(IIssueWriter entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Add(IIssueWriter entity)
 {
     Context.IssueWriters.Add((IssueWriter)entity);
 }
 public void Update(IIssueWriter entity)
 {
     Context.SetModified(entity);
 }
 public void Deactivate(IIssueWriter entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Remove(IIssueWriter entity)
 {
     Context.IssueWriters.Remove((IssueWriter)entity);
 }
 protected bool Remove(IIssueWriter entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     IssueWritersRepository.Remove(entity);
     // Try to Save Changes
     IssueWritersRepository.SaveChanges();
     // Finished!
     return true;
 }
 public void Add(IIssueWriter entity)
 {
     Context.IssueWriters.Add((IssueWriter)entity);
 }