public static Tag ToDto(Db.Tag tag) { return tag == null ? null : new Tag { TagId = tag.TagId, TagName = tag.TagName, CreatedBy = tag.CreatedBy, CreatedDate = tag.CreatedDate, ModifiedBy = tag.ModifiedBy, ModifiedDate = tag.ModifiedDate }; }