Exemple #1
0
        internal static OfflineData From(object model, string operation, Exception ex)
        {
            OfflineData ret = new OfflineData();

            ret.Json      = JsonConvert.SerializeObject(model);
            ret.Operation = operation;
            ret.Error     = ex.FindRoot()?.Message;
            return(ret);
        }
Exemple #2
0
        internal static async Task <int> Delete(int id)
        {
            if (id > 0)
            {
                using (var db = ionixFactory.CreateDbClient())
                {
                    OfflineData entity = new OfflineData {
                        Id = id
                    };
                    await db.Cmd.DeleteAsync(entity);
                }
            }

            return(0);
        }