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