public static T GetObj<T>(Employee model) { T result = default(T); if (model is T) { result = (T)(object)model; //或 (T)((object)model); } return result; }