Exemplo n.º 1
0
        public long GetLastId()
        {
            var lastId = noticeRepository.GetAll().Select(x => x.Id).Max();

            //var lastObj = noticeRepository.GetAll().OrderByDescending(x => x.Id).FirstOrDefault();
            //if (lastObj != null)
            //{
            //    return lastObj.Id;
            //}
            //return 0;

            return(lastId);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Function to get all Notice
 /// </summary>
 /// <returns>Notice</returns>
 public IEnumerable <Notice> GetAll()
 {
     return(Repository.GetAll().Select(N => N.ToClient()));
 }