Exemplo n.º 1
0
        public JObject GetChangesFromSourceControl(string orderBy, int skip, int take
                                                   , string comment
                                                   , string user
                                                   , string fromDateTime
                                                   , string toDateTime
                                                   , string codePath
                                                   , string codeName)
        {
            var count = 0;


            return(JObject.Parse(JsonConvert.SerializeObject
                                     (new
            {
                rows = SourceControl.GeChangesByPagination(orderBy,
                                                           skip,
                                                           take,
                                                           codePath.Replace(Config.UrlDelimeter, Helper.RootUrl),
                                                           codeName,
                                                           comment,
                                                           user,
                                                           fromDateTime.Replace("-", Helper.RootUrl).Replace("_", ":"),
                                                           toDateTime.Replace("-", Helper.RootUrl).Replace("_", ":"),
                                                           out count)
                       .Select(sr => new
                {
                    Id = sr.Id.ToString().Trim(),
                    sr.LocalDateTime,
                    sr.Comment,
                    sr.Version,
                    sr.User,
                    sr.DateTime
                }),
                total = count
            }, Formatting.None)));
        }