Inheritance: SmartDeviceProject1.SqlCeOfflineEntity
コード例 #1
0
 public void AddStatus(Status entity) {
     base.AddItem<Status>(entity);
 }
コード例 #2
0
 public void DeleteStatus(Status entity) {
     base.DeleteItem<Status>(entity);
 }
コード例 #3
0
ファイル: SqlCeStorageHandler.cs プロジェクト: rafek/SyncFx
        public List<Status> GetAllStatus()
        {
            var statuses = new List<Status>();

            using (var command = new SqlCeCommand())
            {
                command.Connection = GetSqlCeConnection();
                command.CommandText = GET_ALL_STATUS;

                SqlCeDataReader reader = command.ExecuteReader();

                while (reader.Read())
                {
                    var p = new Status
                                {
                                    ID = (int) reader["ID"],
                                    Name = reader["Name"] as string,
                                    ServiceMetadata = new OfflineEntityMetadata()
                                    {
                                        IsTombstone = false,
                                        Id = reader["_MetadataID"] as string
                                    }
                                };

                    statuses.Add(p);
                }
            }

            return statuses;
        }