public void GetAllShouldReturnEntities()
        {
            List <ScientificSpeciality> result =
                repository.GetAll(null);

            Assert.AreNotEqual(0, result, "GetAll ничего не вернул");
        }
Пример #2
0
 public IHttpActionResult Get([FromUri] SpecialityFilter filter)
 {
     try
     {
         List <ScientificSpecialityModel> list = _repository.GetAll(filter).Select(MapEntityToModel).ToList();
         var content = new EntitiesListResult <ScientificSpecialityModel>
         {
             Data     = list,
             Page     = -1,
             PageSize = -1
         };
         ;
         content.Total = list.Count;
         return(Ok(content));
     }
     catch (Exception e)
     {
         return(HandleException(e));
     }
 }