常用方法
常用方法
常用方法
常用方法
public async Task <ActionResult> SaveWork(Work work) { if (work.Id == 0) { return(Ok(await _repo.AddWorkAsync(work))); } else { return(Ok(await _repo.UpdateWorkAsync(work))); } }
public async Task <ActionResult> SaveWork(Work work) { if (work.Id == 0) { return(Ok(await _repo.AddWorkAsync(work))); } else { return(Ok(await _repo.UpdateWorkAsync(work))); } }