我试图根据传入的对象类型(在本例中为实体)返回一个整数参数,但不确定格式。请问有什么帮助吗?
entity.ID = db.Create(
entity.Name,
entity.Description,
entity.InitialStep != null ? (int?)entity.InitialStep.ID : null,
entity.IsPrivate,
entity.AllowOnBehalfSubmission,
new Func<int>{something needs to happen here and return an integer});