I working on mvc asp.net csharp i need to make function return json result when branch code exist then return true and if not exist return false so can you help me do this function return json result true or false
public JsonResult CheckExist(string BranchCode) { string branches = _db.Branch.Single(x => x.iBranchCode == BranchCode).iBranchCode.ToString(); // so what i write here to return true or false }