protected int InsertRow()
        {
            try
            {
                using (var db = new DataConnection(DatabaseActor.DataProvider, _connection))
                {
                    return Convert.ToInt32(db.InsertWithIdentity(new Entities.DistributedLock()
                    {
                        Resource = _resource
                    }));
                }
            }
            catch (Exception)
            {
                return 0;
            }

        }
Exemple #2
0
		public void InsertWithGuidIdentity2(string context)
		{
			using (var db = new DataConnection(context))
			{
				var id = (Guid)db.InsertWithIdentity(new GuidID2 {});
			}
		}