/// <summary>
 /// Adds an invoice (racun) async.
 /// </summary>
 /// <param name="racun"></param>
 /// <returns></returns>
 public virtual Task<int> AddAsync(IRacunZaglavlje racun)
 {
     try
     {
         return Repository.AddAsync(racun);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 /// <summary>
 /// Updates the invoice (racun) async.
 /// </summary>
 /// <param name="racun"></param>
 /// <returns></returns>
 public virtual Task<int> UpdateAsync(IRacunZaglavlje racun)
 {
     try
     {
         return Repository.UpdateAsync<EvidencijaClanova.DAL.RacunZaglavlje>(Mapper.Map<EvidencijaClanova.DAL.RacunZaglavlje>(racun));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 /// <summary>
 /// Adds a new invoice (racun).
 /// </summary>
 /// <param name="racun"></param>
 /// <returns></returns>
 public virtual Task<int> AddAsync(IRacunZaglavlje racun)
 {
     try
     {
         racun.Broj = Repository.GetWhere<RacunZaglavlje>().Where(a => a.Broj != null).OrderByDescending(a => a.Broj).Select(a => a.Broj).FirstOrDefault() + 1;
         return Repository.AddAsync<DAL.RacunZaglavlje>(Mapper.Map<DAL.RacunZaglavlje>(racun));
     }
     catch (Exception e)
     {
         throw e;
     }
 }