C# I’我将能够以列表的形式得到结果。 public IEnumerable<UnitPhaseLog> GetAllForUnitPhase(long unitPhaseId) { using (var db = new DbContex
I’我将能够以列表的形式得到结果。C# I’我将能够以列表的形式得到结果。 public IEnumerable<UnitPhaseLog> GetAllForUnitPhase(long unitPhaseId) { using (var db = new DbContex,c#,sql,entity-framework,C#,Sql,Entity Framework,I’我将能够以列表的形式得到结果。 public IEnumerable<UnitPhaseLog> GetAllForUnitPhase(long unitPhaseId) { using (var db = new DbContext(_connStringKey)) { var querys = from s in db.UnitPhaseLogs where s.UnitPhaseId == un
public IEnumerable<UnitPhaseLog> GetAllForUnitPhase(long unitPhaseId)
{
using (var db = new DbContext(_connStringKey))
{
var querys = from s in db.UnitPhaseLogs
where s.UnitPhaseId == unitPhaseId
select s;
return querys;
}
}
public enum UnitPhaseStatus
{
[Display(Name = "No Status")]
NoStatus,
[Display(Name = "Not Ready")]
NotReady,
[Display(Name = "Materials Needed")]
MaterialsNeeded,
[Display(Name = "Ready For Work")]
ReadyForWork,
[Display(Name = "Work In Progress")]
WorkInProgress,
[Display(Name = "Ready")]
ReadyForQc,
[Display(Name = "Approved")]
Approved,
[Display(Name = "Rejected")]
Rejected,
}
unit.NewUnitPhaseStatus = (UnitPhaseStatus)UnitPhaseStatus;
UnitPhaseStatus UnitPhaseStatus = query.NewUnitPhaseStatus;
unit.NewUnitPhaseStatus = UnitPhaseStatus;
unit.NewUnitPhaseStatus = (UnitPhaseStatus)query.NewUnitPhaseStatus;
public IEnumerable<UnitPhaseLog> GetAllForUnitPhase(long unitPhaseId)
{
using (var db = new DbContext(_connStringKey))
{
var querys = from s in db.UnitPhaseLogs where s.UnitPhaseId == unitPhaseId select s;
List<UnitPhaseLog> UnitPhaseLogList = new List<UnitPhaseLog>();
if (null == querys) return UnitPhaseLogList;
return querys;
}
}