Example #1
0
        public UgovorORadu GetUgovorORaduByID(int ugovorID)
        {
            ISqlGenerator <UgovorORadu> sqlGenerator = new SqlGenerator <UgovorORadu>();

            try
            {
                // Create repository instance
                UgovorORaduRepository repository = new UgovorORaduRepository(SqlCon, sqlGenerator);

                // Call repository method
                var items = repository.GetFirst("HKO.S_UGOVOR_O_RADU", new { ID = ugovorID });

                return(items);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Example #2
0
        public IEnumerable <UgovorORadu> GetUgovorORadu()
        {
            ISqlGenerator <UgovorORadu> sqlGenerator = new SqlGenerator <UgovorORadu>();

            try
            {
                // Create repository instance
                UgovorORaduRepository repository = new UgovorORaduRepository(SqlCon, sqlGenerator);

                // Call repository method
                var items = repository.GetAll("HKO.S_UGOVOR_O_RADU");

                return(items);
            }
            catch (Exception ex)
            {
                throw;
            }
        }