partial void DeleteBin(Bin instance);
partial void InsertBin(Bin instance);
partial void UpdateBin(Bin instance);
/// <summary> /// InsertBin /// </summary> /// <param name="key"></param> /// <param name="status"></param> /// <returns></returns> public int InsertBin(string key, string status) { try { var userId = context.Auths.Where(@w => @w.Key == key).First().UserId; short binStatus = Convert.ToInt16(status); Guid binId = Guid.NewGuid(); Bin bin = new Bin { Id = binId, Status = binStatus, UserId = userId }; context.Bins.InsertOnSubmit(bin); InsertGarbage(binId, userId); SubmitData(); return 210; } catch (Exception ex) { return 100; } }