Exemplo n.º 1
0
        public UserReportBreakTable ConvertModelToTable(string userUniqueId, List <UserReportBreak> model)
        {
            var json = JsonConvert.SerializeObject(model);

            var userReportBreakTable =
                new UserReportBreakTable
            {
                UserUniqueId = userUniqueId,
                Report       = json
            };

            return(userReportBreakTable);
        }
Exemplo n.º 2
0
        public List <UserReportBreak> ConvertTableToModel(UserReportBreakTable table)
        {
            var userReportBreaks = JsonConvert.DeserializeObject <List <UserReportBreak> >(table.Report);

            return(userReportBreaks);
        }