protected bool Equals(ActivityTag other) { return string.Equals(Text, other.Text) && string.Equals(DomainTypeText, other.DomainTypeText) && DomainKey == other.DomainKey && string.Equals(ModeText, other.ModeText); }
public CommandResult <bool> Execute(ApplicationDb db) { ActivityTag activityTag = db.ActivityTags.Where(at => at.Tag.Name == this.TagName && at.ActivityId == this.ActivityId).SingleOrDefault(); db.ActivityTags.Remove(activityTag); db.SaveChanges(); return(new CommandResult <bool> { Data = true, ResultCode = "0", ResultText = "Succesfully deleted activity tag." }); }