Skip to content

Instantly share code, notes, and snippets.

@isdaviddong
Created January 10, 2017 11:45
/// <summary>
/// 刪除一筆資料
/// </summary>
/// <param name=""></param>
/// <returns></returns>
public ExecuteCommandDefaultResult<List<StudentInfo>> Remove(Guid guid)
{
//找到資料
var ret = from c in StudentInfomation
where c.guid == guid
select c;
//如果有
if (ret.Count() > 0)
{
//移除
StudentInfomation.Remove(ret.FirstOrDefault());
}
return GetData();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment